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 );
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 );
enable = nothingSelected &&

View file

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

View file

@ -2653,11 +2653,6 @@
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>
<!-- 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_bt_fmt">Bluetooth name: %1$s</string>
<string name="knowns_smsphone_fmt">SMS Phone: %1$s</string>