forked from Nexus/nexus
First Draft: Support for pinned messages.
This commit is contained in:
parent
a1e217ac78
commit
a2d2aeca7a
5 changed files with 224 additions and 3 deletions
|
|
@ -12,6 +12,7 @@ import "package:nexus/widgets/room_menu.dart";
|
|||
class RoomAppbar extends ConsumerWidget implements PreferredSizeWidget {
|
||||
final bool isDesktop;
|
||||
final void Function(BuildContext context)? onOpenMemberList;
|
||||
final void Function(BuildContext context)? onOpenPinnedMessagesList;
|
||||
final void Function(BuildContext context) onOpenDrawer;
|
||||
final String? roomId;
|
||||
const RoomAppbar({
|
||||
|
|
@ -19,6 +20,7 @@ class RoomAppbar extends ConsumerWidget implements PreferredSizeWidget {
|
|||
required this.isDesktop,
|
||||
required this.onOpenDrawer,
|
||||
this.onOpenMemberList,
|
||||
this.onOpenPinnedMessagesList,
|
||||
super.key,
|
||||
});
|
||||
|
||||
|
|
@ -128,7 +130,7 @@ class RoomAppbar extends ConsumerWidget implements PreferredSizeWidget {
|
|||
? .new()
|
||||
: .new([
|
||||
IconButton(
|
||||
onPressed: null,
|
||||
onPressed: () => onOpenPinnedMessagesList?.call(context),
|
||||
icon: Icon(Icons.push_pin),
|
||||
tooltip: "Open pinned messages",
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue