don't show KP menuitem when there are none

This commit is contained in:
Eric House 2020-09-28 08:16:48 -07:00
parent aff75053ac
commit 3d078d0894
3 changed files with 2 additions and 8 deletions

View file

@ -1715,7 +1715,7 @@ public class GamesListDelegate extends ListDelegateBase
enable = nothingSelected && XWPrefs.getStudyEnabled( m_activity ); enable = nothingSelected && XWPrefs.getStudyEnabled( m_activity );
Utils.setItemVisible( menu, R.id.games_menu_study, enable ); Utils.setItemVisible( menu, R.id.games_menu_study, enable );
enable = BuildConfig.HAVE_KNOWN_PLAYERS && nothingSelected; enable = nothingSelected && XwJNI.hasKnownPlayers();
Utils.setItemVisible( menu, R.id.games_menu_knownplyrs, enable ); Utils.setItemVisible( menu, R.id.games_menu_knownplyrs, enable );
enable = nothingSelected && enable = nothingSelected &&

View file

@ -194,8 +194,7 @@ public class KnownPlayersDelegate extends DelegateBase {
activity.startActivity( intent ); activity.startActivity( intent );
} }
} else { } else {
dlg.makeOkOnlyBuilder( R.string.no_knowns_expl ) Assert.failDbg();
.show();
} }
} }
} }

View file

@ -2653,11 +2653,6 @@
new games. Their names default to what the remote user has chosen, new games. Their names default to what the remote user has chosen,
but you can edit them to make them easier for you to use.</string> but you can edit them to make them easier for you to use.</string>
<!-- Shown instead of Known Players viewer when there aren't any -->
<string name="no_knowns_expl">There havent been any Known Players
saved yet. Known Players are harvested from networked games after
they connect successfully. Give it time.</string>
<string name="knowns_mqtt_fmt">MQTT DevID: %1$s</string> <string name="knowns_mqtt_fmt">MQTT DevID: %1$s</string>
<string name="knowns_bt_fmt">Bluetooth name: %1$s</string> <string name="knowns_bt_fmt">Bluetooth name: %1$s</string>
<string name="knowns_smsphone_fmt">SMS Phone: %1$s</string> <string name="knowns_smsphone_fmt">SMS Phone: %1$s</string>