make buildEventOptions an extension
This commit is contained in:
parent
6ad4657d76
commit
529a2e35c4
3 changed files with 277 additions and 269 deletions
|
|
@ -18,7 +18,7 @@ import "package:nexus/widgets/room_appbar.dart";
|
|||
import "package:nexus/main.dart";
|
||||
import "package:super_sliver_list/super_sliver_list.dart";
|
||||
import "package:nexus/widgets/room_chat/chat_timeline.dart";
|
||||
import "package:nexus/helpers/build_event_options.dart";
|
||||
import "package:nexus/helpers/extensions/build_event_options.dart";
|
||||
|
||||
final class const RoomChat({
|
||||
required final String? roomId,
|
||||
|
|
@ -193,18 +193,18 @@ final class const RoomChat({
|
|||
},
|
||||
);
|
||||
|
||||
IList<PopupMenuEntry> getEventOptions(Event event) => buildEventOptions(
|
||||
context: context,
|
||||
ref: ref,
|
||||
roomId: roomId,
|
||||
userId: userId,
|
||||
event: event,
|
||||
onRelation: (event, type) {
|
||||
relatedEvent.value = event;
|
||||
relationType.value = type;
|
||||
composerNode.requestFocus();
|
||||
},
|
||||
);
|
||||
IList<PopupMenuEntry> getEventOptions(Event event) =>
|
||||
event.buildEventOptions(
|
||||
context: context,
|
||||
ref: ref,
|
||||
roomId: roomId,
|
||||
userId: userId,
|
||||
onRelation: (event, type) {
|
||||
relatedEvent.value = event;
|
||||
relationType.value = type;
|
||||
composerNode.requestFocus();
|
||||
},
|
||||
);
|
||||
|
||||
return Scaffold(
|
||||
endDrawer: PinnedEventsDrawer(
|
||||
|
|
|
|||
Loading…
Reference in a new issue