Move chess entry into the composer's + menu
This commit is contained in:
1 parent
c2877f6875
commit
296ddb5e11
2 files changed
+8
-10
No files matched your search
@@ -9,7 +9,7 @@ Play chess with someone on a channel, or watch other people's games. Moves go ov
|
||||
|
||||
## Start a game
|
||||
|
||||
Open a channel, tap **⋮**, then **Chess games**. The menu shows how many games and invites are open on that channel.
|
||||
Open a channel, tap **+** next to the message box, then **Chess games**. The entry shows how many games and invites are open on that channel.
|
||||
|
||||
- **Challenge someone**: pick a person recently heard on this channel. Only a radio with that name can accept. Their phone shows a notification.
|
||||
- **Post an open invite**: anyone on the channel can accept. If two people accept at the same time, the inviter's phone picks the first one it heard and tells everyone; the other person keeps watching.
|
||||
|
||||
@@ -595,8 +595,6 @@ class _ChannelChatScreenState extends State<ChannelChatScreen>
|
||||
onSelected: (value) {
|
||||
final connector = context.read<MeshCoreConnector>();
|
||||
switch (value) {
|
||||
case 'games':
|
||||
showChessGamesSheet(context, widget.channel);
|
||||
case 'messageFilter':
|
||||
_toggleChannelFiltering();
|
||||
case 'notifications':
|
||||
@@ -639,13 +637,6 @@ class _ChannelChatScreenState extends State<ChannelChatScreen>
|
||||
.getChannelNotificationMode(muteKey);
|
||||
final readOnly = isRadioReadOnly(context.read<MeshCoreConnector>());
|
||||
return [
|
||||
PopupMenuItem(
|
||||
value: 'games',
|
||||
child: _menuRow(
|
||||
Icons.sports_esports_outlined,
|
||||
chessMenuLabel(context, widget.channel),
|
||||
),
|
||||
),
|
||||
if (_messageFilter case final filter? when filter.settings.enabled)
|
||||
PopupMenuItem(
|
||||
value: 'messageFilter',
|
||||
@@ -2918,6 +2909,11 @@ class _ChannelChatScreenState extends State<ChannelChatScreen>
|
||||
icon: Icons.person_add_alt,
|
||||
label: context.l10n.contactShare_shareAction,
|
||||
),
|
||||
ChatComposerAction(
|
||||
id: 'games',
|
||||
icon: Icons.sports_esports_outlined,
|
||||
label: chessMenuLabel(context, widget.channel),
|
||||
),
|
||||
];
|
||||
},
|
||||
onAction: (action) {
|
||||
@@ -2937,6 +2933,8 @@ class _ChannelChatScreenState extends State<ChannelChatScreen>
|
||||
_textController,
|
||||
focusNode: _textFieldFocusNode,
|
||||
);
|
||||
case 'games':
|
||||
showChessGamesSheet(context, widget.channel);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user