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
for ( long rowid : rowids.keySet() ) {
if ( nli.forceChannel == rowids.get(rowid) ) {
// May not want this at all if it's never a bad thing
makeOkOnlyBuilder( R.string.dropped_dupe )
.setParams(rowid)
.setTitle("add open game button")
.setActionPair( Action.OPEN_GAME,
R.string.button_open_game )
.setParams( rowid, null ) // null: GameSummary
.show();
handled = true;
break;
@ -2760,7 +2760,8 @@ public class GamesListDelegate extends ListDelegateBase
final long rowid = (Long)params[0];
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 ) {
Assert.failDbg();
} else {

View file

@ -2000,9 +2000,12 @@
</plurals>
<string name="summary_thumbsize">Thumbnail size</string>
<string name="thumb_off">Disabled</string>
<!-- <string name="summary_thumb_enabled">Display snapshots of games</string> -->
<string name="dropped_dupe">Invitation received but ignored: it
has already been used to create a game.</string>
<!-- Text of alert shown when user accepts an invitation, e.g. in
email, for the second time. -->
<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="board_menu_invite">Invite</string>
<string name="enable_nfc">NFC is turned off on this device. You