Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Room Settings: Name, Topic, Photo, Aliases, History Visibility #1464

Merged
merged 29 commits into from
Jun 30, 2020

Conversation

onurays
Copy link
Contributor

@onurays onurays commented Jun 9, 2020

WhatsApp Image 2020-06-24 at 11 18 15 (3)

WhatsApp Image 2020-06-24 at 11 18 15 (2)

WhatsApp Image 2020-06-24 at 11 20 14

WhatsApp Image 2020-06-24 at 11 18 15

WhatsApp Image 2020-06-24 at 11 18 15 (1)

copy(
roomSummary = async,
newName = roomSummary?.displayName,
newTopic = roomSummary?.topic
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I won't mix current data and new data in the view state. The RoomSummary can change during the edition, which could lead to bug

@onurays onurays marked this pull request as ready for review June 24, 2020 08:23
@onurays onurays linked an issue Jun 24, 2020 that may be closed by this pull request
8 tasks
Copy link
Member

@ganfra ganfra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some remarks

val workerParams = UploadAvatarWorker.Params(sessionId, avatarUri, fileName)
val workerData = WorkerParamsFactory.toData(workerParams)

val uploadAvatarWork = workManagerProvider.matrixOneTimeWorkRequestBuilder<UploadAvatarWorker>()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same remark than the other PR with uploading avatar, don't think we should use a worker overthere

private fun onRoomAvatarSelected(image: MultiPickerImageType) {
val destinationFile = File(cacheDir, "${image.displayName}_edited_image_${System.currentTimeMillis()}")
val uri = image.contentUri
UCrop.of(uri, destinationFile.toUri())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ucrop again, create helper please

* This class is the view presenting choices for picking avatar.
* It will return result through [Callback].
*/
class AvatarSelectorView(context: Context,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why creating again this class, please refact the existing one to be more dynamic, or use a simple dialog?

@@ -63,7 +71,7 @@ abstract class ProfileActionItem : VectorEpoxyModel<ProfileActionItem.Holder>()
override fun bind(holder: Holder) {
super.bind(holder)
holder.view.setOnClickListener(listener)
if (listener == null) {
if (listener == null || !editable) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why adding this? editable bool is for showing/hiding icon. Maybe it's not the good vocabulary, I think it's the one used by Nad, but not sure.

@onurays onurays linked an issue Jun 25, 2020 that may be closed by this pull request
5 tasks
@bmarty
Copy link
Member

bmarty commented Jun 29, 2020

Please fix this reported error:

❌ Error: 'android\.app\.AlertDialog' detected 1 time, in file './vector/src/main/java/im/vector/riotx/features/media/BigImageViewerActivity.kt', at line 20.

@bmarty bmarty force-pushed the feature/room_settings branch from 4dedb86 to e0ea0c1 Compare June 30, 2020 12:24
},
{
_viewEvents.post(RoomProfileViewEvents.Failure(it))
})
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may put the last parentheses to the new line? :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@bmarty bmarty merged commit 87a087c into develop Jun 30, 2020
@bmarty bmarty deleted the feature/room_settings branch June 30, 2020 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants