offer to open game when rejecting invite as dup

This commit is contained in:
Eric House 2020-08-29 17:17:49 -07:00
parent 46752af0cd
commit 53563236e4
2 changed files with 11 additions and 7 deletions

View file

@ -2349,10 +2349,10 @@ public class GamesListDelegate extends ListDelegateBase
// creates // creates
for ( long rowid : rowids.keySet() ) { for ( long rowid : rowids.keySet() ) {
if ( nli.forceChannel == rowids.get(rowid) ) { if ( nli.forceChannel == rowids.get(rowid) ) {
// May not want this at all if it's never a bad thing
makeOkOnlyBuilder( R.string.dropped_dupe ) makeOkOnlyBuilder( R.string.dropped_dupe )
.setParams(rowid) .setActionPair( Action.OPEN_GAME,
.setTitle("add open game button") R.string.button_open_game )
.setParams( rowid, null ) // null: GameSummary
.show(); .show();
handled = true; handled = true;
break; break;
@ -2760,7 +2760,8 @@ public class GamesListDelegate extends ListDelegateBase
final long rowid = (Long)params[0]; final long rowid = (Long)params[0];
GameSummary summary = (GameSummary)params[1]; GameSummary summary = (GameSummary)params[1];
if ( summary.conTypes.contains( CommsConnType.COMMS_CONN_RELAY ) if ( null != summary
&& summary.conTypes.contains( CommsConnType.COMMS_CONN_RELAY )
&& summary.roomName.length() == 0 ) { && summary.roomName.length() == 0 ) {
Assert.failDbg(); Assert.failDbg();
} else { } else {

View file

@ -2000,9 +2000,12 @@
</plurals> </plurals>
<string name="summary_thumbsize">Thumbnail size</string> <string name="summary_thumbsize">Thumbnail size</string>
<string name="thumb_off">Disabled</string> <string name="thumb_off">Disabled</string>
<!-- <string name="summary_thumb_enabled">Display snapshots of games</string> --> <!-- Text of alert shown when user accepts an invitation, e.g. in
<string name="dropped_dupe">Invitation received but ignored: it email, for the second time. -->
has already been used to create a game.</string> <string name="dropped_dupe">This invitation has already been used
to create a game.</string>
<!-- Button in "Duplicate invitation ignored" alert -->
<string name="button_open_game">Open Game</string>
<string name="cur_menu_marker_fmt">%1$s (in use)</string> <string name="cur_menu_marker_fmt">%1$s (in use)</string>
<string name="board_menu_invite">Invite</string> <string name="board_menu_invite">Invite</string>
<string name="enable_nfc">NFC is turned off on this device. You <string name="enable_nfc">NFC is turned off on this device. You