mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-04 20:46:28 +01:00
'show network' option takes priority over 'reset'
These are debug-build-only, but useful for my debugging!
This commit is contained in:
parent
15cc0dfac5
commit
fb1088b9a8
2 changed files with 20 additions and 15 deletions
|
@ -450,12 +450,23 @@ public abstract class DelegateBase implements DlgClickNotify,
|
||||||
.setPositiveButton( android.R.string.ok, null );
|
.setPositiveButton( android.R.string.ok, null );
|
||||||
|
|
||||||
if ( BuildConfig.NON_RELEASE && null != conTypes ) {
|
if ( BuildConfig.NON_RELEASE && null != conTypes ) {
|
||||||
if ( conTypes.contains( CommsConnType.COMMS_CONN_RELAY )
|
OnClickListener lstnr = null;
|
||||||
|| conTypes.contains( CommsConnType.COMMS_CONN_P2P ) ) {
|
int buttonTxt = 0;
|
||||||
OnClickListener lstnr = new OnClickListener() {
|
if ( conTypes.contains( CommsConnType.COMMS_CONN_MQTT ) ) {
|
||||||
|
buttonTxt = R.string.list_item_relaypage;
|
||||||
|
final int gameID = summary.gameID;
|
||||||
|
lstnr = new OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick( DialogInterface dlg,
|
public void onClick( DialogInterface dlg, int whichButton ) {
|
||||||
int whichButton ) {
|
NetUtils.showGamePage( m_activity, gameID );
|
||||||
|
}
|
||||||
|
};
|
||||||
|
} else if ( conTypes.contains( CommsConnType.COMMS_CONN_RELAY )
|
||||||
|
|| conTypes.contains( CommsConnType.COMMS_CONN_P2P ) ) {
|
||||||
|
buttonTxt = R.string.button_reconnect;
|
||||||
|
lstnr = new OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick( DialogInterface dlg, int buttn ) {
|
||||||
NetStateCache.reset( m_activity );
|
NetStateCache.reset( m_activity );
|
||||||
if ( conTypes.contains( CommsConnType.COMMS_CONN_RELAY ) ) {
|
if ( conTypes.contains( CommsConnType.COMMS_CONN_RELAY ) ) {
|
||||||
RelayService.reset( getActivity() );
|
RelayService.reset( getActivity() );
|
||||||
|
@ -465,16 +476,9 @@ public abstract class DelegateBase implements DlgClickNotify,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
ab.setNegativeButton( R.string.button_reconnect, lstnr );
|
|
||||||
} else if ( conTypes.contains( CommsConnType.COMMS_CONN_MQTT ) ) {
|
|
||||||
final int gameID = summary.gameID;
|
|
||||||
OnClickListener lstnr = new OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick( DialogInterface dlg, int whichButton ) {
|
|
||||||
NetUtils.showGamePage( m_activity, gameID );
|
|
||||||
}
|
}
|
||||||
};
|
if ( null != lstnr ) {
|
||||||
ab.setNegativeButton( R.string.list_item_relaypage, lstnr );
|
ab.setNegativeButton( buttonTxt, lstnr );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dialog = ab.create();
|
dialog = ab.create();
|
||||||
|
|
|
@ -2043,6 +2043,7 @@
|
||||||
<string name="confirm_delete">Are you sure you want to delete the
|
<string name="confirm_delete">Are you sure you want to delete the
|
||||||
current game? \n\n(This action cannot be undone.)</string>
|
current game? \n\n(This action cannot be undone.)</string>
|
||||||
<string name="duplicate_group_name_fmt">The group “%1$s” already exists.</string>
|
<string name="duplicate_group_name_fmt">The group “%1$s” already exists.</string>
|
||||||
|
<!-- only for debug builds: button to force game to reconnect to legacy relay -->
|
||||||
<string name="button_reconnect">Reconnect</string>
|
<string name="button_reconnect">Reconnect</string>
|
||||||
<string name="square_tiles">Square rack tiles</string>
|
<string name="square_tiles">Square rack tiles</string>
|
||||||
<string name="square_tiles_summary">Even if they can be taller</string>
|
<string name="square_tiles_summary">Even if they can be taller</string>
|
||||||
|
|
Loading…
Add table
Reference in a new issue