feat: Improved mouse support for selecting events

This commit is contained in:
krille-chan 2023-08-17 19:16:12 +02:00
commit 6e9d3627cc
No known key found for this signature in database
3 changed files with 109 additions and 96 deletions

View file

@ -816,6 +816,17 @@ class ChatController extends State<ChatPageWithRoom> {
return true;
}
bool get canPinSelectedEvents {
if (isArchived ||
!room.canChangeStateEvent(EventTypes.RoomPinnedEvents) ||
selectedEvents.length != 1 ||
!selectedEvents.single.status.isSent) {
return false;
}
return currentRoomBundle
.any((cl) => selectedEvents.first.senderId == cl!.userID);
}
bool get canEditSelectedEvents {
if (isArchived ||
selectedEvents.length != 1 ||