From 53563236e4389dae4da175e448eddf845f45e85b Mon Sep 17 00:00:00 2001 From: Eric House Date: Sat, 29 Aug 2020 17:17:49 -0700 Subject: [PATCH] offer to open game when rejecting invite as dup --- .../java/org/eehouse/android/xw4/GamesListDelegate.java | 9 +++++---- xwords4/android/app/src/main/res/values/strings.xml | 9 ++++++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GamesListDelegate.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GamesListDelegate.java index 5f43758fd..e7fe0ae61 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GamesListDelegate.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GamesListDelegate.java @@ -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 { diff --git a/xwords4/android/app/src/main/res/values/strings.xml b/xwords4/android/app/src/main/res/values/strings.xml index 698ae558e..af526f2e2 100644 --- a/xwords4/android/app/src/main/res/values/strings.xml +++ b/xwords4/android/app/src/main/res/values/strings.xml @@ -2000,9 +2000,12 @@ Thumbnail size Disabled - - Invitation received but ignored: it - has already been used to create a game. + + This invitation has already been used + to create a game. + + Open Game %1$s (in use) Invite NFC is turned off on this device. You