Apply 1 suggestion(s) to 1 file(s)
This commit is contained in:
parent
18300eba89
commit
0f448af5dc
7 changed files with 98 additions and 69 deletions
|
|
@ -834,16 +834,22 @@ class ChatController extends State<Chat> {
|
|||
if (response == OkCancelResult.ok) {
|
||||
final events = room!.pinnedEventIds
|
||||
..removeWhere((oldEvent) => oldEvent == eventId);
|
||||
room!.setPinnedEvents(events);
|
||||
showFutureLoadingDialog(
|
||||
context: context,
|
||||
future: () => room!.setPinnedEvents(events),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
void pinEvent() {
|
||||
room!.setPinnedEvents(
|
||||
<String>{
|
||||
...room!.pinnedEventIds,
|
||||
...selectedEvents.map((e) => e.eventId),
|
||||
}.toList(),
|
||||
showFutureLoadingDialog(
|
||||
context: context,
|
||||
future: () => room!.setPinnedEvents(
|
||||
<String>{
|
||||
...room!.pinnedEventIds,
|
||||
...selectedEvents.map((e) => e.eventId),
|
||||
}.toList(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue