Skip to content

Commit

Permalink
TW-2150 fix confirm button not displaying when changing group avatar
Browse files Browse the repository at this point in the history
  • Loading branch information
KhaledNjim authored and hoangdat committed Nov 27, 2024
1 parent 2279df5 commit e836986
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/pages/chat_details/chat_details_edit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class ChatDetailsEditController extends State<ChatDetailsEdit>
final MenuController menuController = MenuController();

final isEditedGroupInfoNotifier = ValueNotifier<bool>(false);
final isValidGroupNameNotifier = ValueNotifier<bool>(false);
final isValidGroupNameNotifier = ValueNotifier<bool>(true);

Client get client => Matrix.of(context).client;

Expand Down Expand Up @@ -483,15 +483,15 @@ class ChatDetailsEditController extends State<ChatDetailsEdit>
groupNameEmptyNotifier.value = groupNameTextEditingController.text.isEmpty;

groupNameTextEditingController.addListener(() {
isValidGroupNameNotifier.value =
getErrorMessage(groupNameTextEditingController.text) == null;
if (_isEditAvatar) {
return;
}
isEditedGroupInfoNotifier.value =
groupNameTextEditingController.text != room?.name;
groupNameEmptyNotifier.value =
groupNameTextEditingController.text.isEmpty;
isValidGroupNameNotifier.value =
getErrorMessage(groupNameTextEditingController.text) == null;
});
}

Expand Down

0 comments on commit e836986

Please sign in to comment.