some small fix for archive/leave button PR
This commit is contained in:
parent
33de062a6e
commit
199e71159d
3 changed files with 6 additions and 9 deletions
|
|
@ -454,11 +454,7 @@ class ChatController extends State<ChatPageWithRoom>
|
|||
}
|
||||
}
|
||||
timeline!.requestKeys(onlineKeyBackupOnly: false);
|
||||
if (!room.isSpace &&
|
||||
room.membership == Membership.join &&
|
||||
room.markedUnread) {
|
||||
room.markUnread(false);
|
||||
}
|
||||
if (room.markedUnread) room.markUnread(false);
|
||||
|
||||
// when the scroll controller is attached we want to scroll to an event id, if specified
|
||||
// and update the scroll controller...which will trigger a request history, if the
|
||||
|
|
|
|||
|
|
@ -229,7 +229,10 @@ class _SpaceViewState extends State<SpaceView> {
|
|||
),
|
||||
message: spaceChild?.topic ?? room?.topic,
|
||||
actions: [
|
||||
// #Pangea
|
||||
// if (room == null)
|
||||
if (room == null || room.membership == Membership.leave)
|
||||
// Pangea#
|
||||
SheetAction(
|
||||
key: SpaceChildContextAction.join,
|
||||
label: L10n.of(context)!.joinRoom,
|
||||
|
|
@ -304,7 +307,6 @@ class _SpaceViewState extends State<SpaceView> {
|
|||
} else {
|
||||
widget.controller.toggleSelection(room.id);
|
||||
await widget.controller.leaveAction();
|
||||
widget.controller.toggleSelection(room.id);
|
||||
}
|
||||
_refresh();
|
||||
break;
|
||||
|
|
@ -344,7 +346,6 @@ class _SpaceViewState extends State<SpaceView> {
|
|||
} else {
|
||||
widget.controller.toggleSelection(room.id);
|
||||
await widget.controller.archiveAction();
|
||||
widget.controller.toggleSelection(room.id);
|
||||
}
|
||||
// Pangea#
|
||||
_refresh();
|
||||
|
|
|
|||
|
|
@ -71,8 +71,8 @@ extension ClassAndExchangeSettingsRoomExtension on Room {
|
|||
}
|
||||
final spaceChildPower =
|
||||
currentPowerContent["events"][EventTypes.spaceChild];
|
||||
final studentAnalyticsPower =
|
||||
currentPowerContent[PangeaEventTypes.studentAnalyticsSummary];
|
||||
final studentAnalyticsPower = currentPowerContent["events"]
|
||||
[PangeaEventTypes.studentAnalyticsSummary];
|
||||
|
||||
if ((spaceChildPower == null || studentAnalyticsPower == null)) {
|
||||
currentPowerContent["events"][EventTypes.spaceChild] = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue