-
Notifications
You must be signed in to change notification settings - Fork 18
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
TW-136 feat: set avatar group chat at creation #156
Conversation
Great!!! but what is the limitation of avatar? |
as I saw in the demo, user need to wait for a long time after submitting the creation. Not a good UX. Please create the |
1fe6cd9
to
1f3d29a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
anw, I like the way you are working now. 💪
3226bff
to
e66fe7b
Compare
I put a default value to prevent blink blink @hoangdat |
ef75f7c
to
2e1d77e
Compare
lib/pages/new_group/new_group.dart
Outdated
|
||
final selectedContactsMapNotifier = ValueNotifier<Map<PresentationContact, bool>>({}); | ||
final haveSelectedContactsNotifier = ValueNotifier(false); | ||
final haveGroupNameNotifier = ValueNotifier(false); | ||
final isEnableEEEncryptionNotifier = ValueNotifier(true); | ||
final avatarNotifier = ValueNotifier<MatrixFile?>(null); | ||
|
||
final int maxFileSizeDefault = 5 * 1024 * 1024; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should clarify this variable. is it in MB or KB or GB ?. maxFileSizeDefault
=> maxFileSizeDefaultInMB
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hoangdat I think it's a good solution in case there is no upload size limit in the config, low connection etc. It prevents having a blank space. you have the final word
@hoangdat I didn't manage to find a solution with VROUTER library. I removed an useless listening stream since it's an action. The interactor stream is being listened when the user creates a room then every listeners are unsubscribed after done event.
|
This Closes #136
279aa8c
to
9946427
Compare
final Stream<Either<Failure, Success>> setRoomAvatarStream = setRoomAvatarInteractor.execute(matrixClient, roomId, newRoomInformations.avatar); | ||
yield* setRoomAvatarStream; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
final Stream<Either<Failure, Success>> setRoomAvatarStream = setRoomAvatarInteractor.execute(matrixClient, roomId, newRoomInformations.avatar); | |
yield* setRoomAvatarStream; | |
yield* setRoomAvatarInteractor.execute(matrixClient, roomId, newRoomInformations.avatar); | |
), | ||
FutureBuilder<ServerConfig>( | ||
future: Matrix.of(context).client.getConfig(), | ||
builder: (context, snapshot) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it any blink blink effect?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lib/pages/new_group/new_group.dart
Outdated
|
||
final selectedContactsMapNotifier = ValueNotifier<Map<PresentationContact, bool>>({}); | ||
final haveSelectedContactsNotifier = ValueNotifier(false); | ||
final haveGroupNameNotifier = ValueNotifier(false); | ||
final isEnableEEEncryptionNotifier = ValueNotifier(true); | ||
final avatarNotifier = ValueNotifier<MatrixFile?>(null); | ||
|
||
final int maxFileSizeDefault = 5 * 1024 * 1024; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we remove it?
Demo Screen.Recording.2023-06-21.at.12.46.00.mov |
Thank you for the help @dab246 ! The main point of this feature is to be redirected right after clicking creating the room. That's why we can't cancel the stream until set avatar is finished. But if @hoangdat changed his idea about the UX, we can use your commit (You can see the intended UX on GIF description) |
I will close this PR, but still keep it to make some reference. I explain more information in the ticket #136 |
This Closes
DEMO :
Create group with avatar :
Create group without avatar :
Avatar too big :