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
|
## 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.
|
- **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.
|
- **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) {
|
onSelected: (value) {
|
||||||
final connector = context.read<MeshCoreConnector>();
|
final connector = context.read<MeshCoreConnector>();
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case 'games':
|
|
||||||
showChessGamesSheet(context, widget.channel);
|
|
||||||
case 'messageFilter':
|
case 'messageFilter':
|
||||||
_toggleChannelFiltering();
|
_toggleChannelFiltering();
|
||||||
case 'notifications':
|
case 'notifications':
|
||||||
@@ -639,13 +637,6 @@ class _ChannelChatScreenState extends State<ChannelChatScreen>
|
|||||||
.getChannelNotificationMode(muteKey);
|
.getChannelNotificationMode(muteKey);
|
||||||
final readOnly = isRadioReadOnly(context.read<MeshCoreConnector>());
|
final readOnly = isRadioReadOnly(context.read<MeshCoreConnector>());
|
||||||
return [
|
return [
|
||||||
PopupMenuItem(
|
|
||||||
value: 'games',
|
|
||||||
child: _menuRow(
|
|
||||||
Icons.sports_esports_outlined,
|
|
||||||
chessMenuLabel(context, widget.channel),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
if (_messageFilter case final filter? when filter.settings.enabled)
|
if (_messageFilter case final filter? when filter.settings.enabled)
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
value: 'messageFilter',
|
value: 'messageFilter',
|
||||||
@@ -2918,6 +2909,11 @@ class _ChannelChatScreenState extends State<ChannelChatScreen>
|
|||||||
icon: Icons.person_add_alt,
|
icon: Icons.person_add_alt,
|
||||||
label: context.l10n.contactShare_shareAction,
|
label: context.l10n.contactShare_shareAction,
|
||||||
),
|
),
|
||||||
|
ChatComposerAction(
|
||||||
|
id: 'games',
|
||||||
|
icon: Icons.sports_esports_outlined,
|
||||||
|
label: chessMenuLabel(context, widget.channel),
|
||||||
|
),
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
onAction: (action) {
|
onAction: (action) {
|
||||||
@@ -2937,6 +2933,8 @@ class _ChannelChatScreenState extends State<ChannelChatScreen>
|
|||||||
_textController,
|
_textController,
|
||||||
focusNode: _textFieldFocusNode,
|
focusNode: _textFieldFocusNode,
|
||||||
);
|
);
|
||||||
|
case 'games':
|
||||||
|
showChessGamesSheet(context, widget.channel);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in new issue
Block a user