Skip to content

Commit

Permalink
Fixed code in Fluffchat files to match convention
Browse files Browse the repository at this point in the history
  • Loading branch information
Kelrap committed May 22, 2024
1 parent f79203a commit ceb7fdb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/pages/chat_list/chat_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -728,9 +728,11 @@ class ChatListController extends State<ChatList>
while (selectedRoomIds.isNotEmpty) {
final roomId = selectedRoomIds.first;
try {
// #Pangea
if (client.getRoomById(roomId)!.isUnread) {
await client.getRoomById(roomId)!.markUnread(false);
}
// Pangea#
await client.getRoomById(roomId)!.leave();
} finally {
toggleSelection(roomId);
Expand Down
2 changes: 2 additions & 0 deletions lib/pages/chat_list/chat_list_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,11 @@ class ChatListItem extends StatelessWidget {
message: L10n.of(context)!.archiveRoomDescription,
);
if (confirmed == OkCancelResult.cancel) return;
// #Pangea
if (room.isUnread) {
await room.markUnread(false);
}
// Pangea#
await showFutureLoadingDialog(
context: context,
future: () => room.leave(),
Expand Down
2 changes: 2 additions & 0 deletions lib/pages/chat_list/utils/on_chat_tap.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@ void onChatTap(Room room, BuildContext context) async {
return;
}
if (inviteAction == InviteActions.decline) {
// #Pangea
if (room.isUnread) {
await room.markUnread(false);
}
// Pangea#
await showFutureLoadingDialog(
context: context,
future: room.leave,
Expand Down

0 comments on commit ceb7fdb

Please sign in to comment.