forked from Nexus/nexus
add threads button back to appbar, hide close button on linux mobile mode
This commit is contained in:
parent
06ba23d3c0
commit
a229fcc598
3 changed files with 18 additions and 20 deletions
|
|
@ -77,6 +77,12 @@ final class const Appbar({
|
|||
onPressed: maximize,
|
||||
icon: const Icon(Icons.fullscreen),
|
||||
),
|
||||
if (ref
|
||||
.watch(SettingsController.provider)
|
||||
.whenOrNull(
|
||||
data: (settings) => !settings.linuxMobileMode,
|
||||
) ??
|
||||
true)
|
||||
IconButton(
|
||||
tooltip: "Close window",
|
||||
onPressed: () => exit(0),
|
||||
|
|
|
|||
|
|
@ -63,6 +63,11 @@ final class const RoomAppbar({
|
|||
room == null
|
||||
? []
|
||||
: [
|
||||
IconButton(
|
||||
onPressed: onOpenThreads?.call,
|
||||
icon: Icon(Icons.forum),
|
||||
tooltip: "Open threads",
|
||||
),
|
||||
IconButton(
|
||||
onPressed: onOpenPinnedMessagesList?.call,
|
||||
icon: Icon(Icons.push_pin),
|
||||
|
|
@ -73,11 +78,7 @@ final class const RoomAppbar({
|
|||
tooltip: "Open member list",
|
||||
icon: Icon(Icons.people),
|
||||
),
|
||||
RoomMenuButton(
|
||||
room,
|
||||
onOpenSearch: onOpenSearch,
|
||||
onOpenThreads: onOpenThreads,
|
||||
),
|
||||
RoomMenuButton(room, onOpenSearch: onOpenSearch),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ final class const RoomMenuButton(
|
|||
final Room? room, {
|
||||
final IList<Room> children = const .empty(),
|
||||
final VoidCallback? onOpenSearch,
|
||||
final VoidCallback? onOpenThreads,
|
||||
super.key,
|
||||
}) extends ConsumerWidget {
|
||||
@override
|
||||
|
|
@ -29,19 +28,11 @@ final class const RoomMenuButton(
|
|||
icon: const Icon(Icons.more_vert),
|
||||
tooltip: "Room options",
|
||||
itemBuilder: (_) => [
|
||||
if (onOpenSearch case final onOpenSearch?)
|
||||
if (onOpenSearch != null)
|
||||
PopupMenuItem(
|
||||
onTap: onOpenSearch,
|
||||
child: ListTile(leading: Icon(Icons.search), title: Text("Search")),
|
||||
),
|
||||
if (onOpenThreads case final onOpenThreads?)
|
||||
PopupMenuItem(
|
||||
onTap: onOpenThreads,
|
||||
child: ListTile(
|
||||
leading: Icon(Icons.forum),
|
||||
title: Text("View Threads"),
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
onTap: () async {
|
||||
if (room != null) await client.markRead(room!);
|
||||
|
|
|
|||
Loading…
Reference in a new issue