Merge pull request #309 from pangeachat/small-ui-fixes
allow leaving for all selected chats
This commit is contained in:
commit
f0424d508e
3 changed files with 17 additions and 2 deletions
|
|
@ -105,6 +105,12 @@ class ChatListController extends State<ChatList>
|
|||
selectedRoomIds.clear();
|
||||
activeSpaceId = spaceId;
|
||||
activeFilter = ActiveFilter.spaces;
|
||||
// #Pangea
|
||||
// don't show all spaces view if in column mode
|
||||
if (spaceId == null && FluffyThemes.isColumnMode(context)) {
|
||||
activeFilter = ActiveFilter.allChats;
|
||||
}
|
||||
// Pangea#
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -693,7 +699,7 @@ class ChatListController extends State<ChatList>
|
|||
title: L10n.of(context)!.areYouSure,
|
||||
okLabel: L10n.of(context)!.yes,
|
||||
cancelLabel: L10n.of(context)!.cancel,
|
||||
message: onlyAdmin
|
||||
message: onlyAdmin && selectedRoomIds.length == 1
|
||||
? L10n.of(context)!.onlyAdminDescription
|
||||
: L10n.of(context)!.leaveRoomDescription,
|
||||
) ==
|
||||
|
|
|
|||
|
|
@ -171,6 +171,12 @@ class ChatListHeader extends StatelessWidget implements PreferredSizeWidget {
|
|||
onPressed: controller.toggleMuted,
|
||||
),
|
||||
// #Pangea
|
||||
if (controller.selectedRoomIds.length > 1)
|
||||
IconButton(
|
||||
icon: const Icon(Icons.arrow_forward),
|
||||
tooltip: L10n.of(context)!.leave,
|
||||
onPressed: controller.leaveAction,
|
||||
),
|
||||
if (controller.selectedRoomIds.length == 1 &&
|
||||
!(Matrix.of(context)
|
||||
.client
|
||||
|
|
|
|||
|
|
@ -147,7 +147,10 @@ class _SpaceViewState extends State<SpaceView> {
|
|||
if (activeSpace != null) {
|
||||
await setChatCount(
|
||||
activeSpace,
|
||||
_lastResponse[activeSpaceId],
|
||||
_lastResponse[activeSpaceId] ??
|
||||
GetSpaceHierarchyResponse(
|
||||
rooms: [],
|
||||
),
|
||||
);
|
||||
}
|
||||
// Pangea#
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue