Merge pull request #309 from pangeachat/small-ui-fixes

allow leaving for all selected chats
pull/1183/head
ggurdin 1 year ago committed by GitHub
commit f0424d508e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -105,6 +105,12 @@ class ChatListController extends State<ChatList>
selectedRoomIds.clear(); selectedRoomIds.clear();
activeSpaceId = spaceId; activeSpaceId = spaceId;
activeFilter = ActiveFilter.spaces; 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, title: L10n.of(context)!.areYouSure,
okLabel: L10n.of(context)!.yes, okLabel: L10n.of(context)!.yes,
cancelLabel: L10n.of(context)!.cancel, cancelLabel: L10n.of(context)!.cancel,
message: onlyAdmin message: onlyAdmin && selectedRoomIds.length == 1
? L10n.of(context)!.onlyAdminDescription ? L10n.of(context)!.onlyAdminDescription
: L10n.of(context)!.leaveRoomDescription, : L10n.of(context)!.leaveRoomDescription,
) == ) ==

@ -171,6 +171,12 @@ class ChatListHeader extends StatelessWidget implements PreferredSizeWidget {
onPressed: controller.toggleMuted, onPressed: controller.toggleMuted,
), ),
// #Pangea // #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 && if (controller.selectedRoomIds.length == 1 &&
!(Matrix.of(context) !(Matrix.of(context)
.client .client

@ -147,7 +147,10 @@ class _SpaceViewState extends State<SpaceView> {
if (activeSpace != null) { if (activeSpace != null) {
await setChatCount( await setChatCount(
activeSpace, activeSpace,
_lastResponse[activeSpaceId], _lastResponse[activeSpaceId] ??
GetSpaceHierarchyResponse(
rooms: [],
),
); );
} }
// Pangea# // Pangea#

Loading…
Cancel
Save