feat: Improved mouse support for selecting events
This commit is contained in:
parent
56c7c72f92
commit
6e9d3627cc
3 changed files with 109 additions and 96 deletions
|
|
@ -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 ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue