mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-09 05:24:44 +01:00
disable delete context menuitem when game open
This commit is contained in:
parent
cfbd06927a
commit
4d24fd38f5
1 changed files with 5 additions and 3 deletions
|
@ -1568,16 +1568,18 @@ public class GamesListDelegate extends ListDelegateBase
|
||||||
Utils.setItemVisible( menu, hideId, false );
|
Utils.setItemVisible( menu, hideId, false );
|
||||||
|
|
||||||
if ( null != item ) {
|
if ( null != item ) {
|
||||||
enable = BoardDelegate.rematchSupported( m_activity,
|
long rowID = item.getRowID();
|
||||||
item.getRowID() );
|
enable = BoardDelegate.rematchSupported( m_activity, rowID );
|
||||||
Utils.setItemVisible( menu, R.id.games_game_rematch, enable );
|
Utils.setItemVisible( menu, R.id.games_game_rematch, enable );
|
||||||
|
|
||||||
enable = item.getSummary().isMultiGame()
|
enable = item.getSummary().isMultiGame()
|
||||||
&& (BuildConfig.DEBUG || XWPrefs.getDebugEnabled( m_activity ));
|
&& (BuildConfig.DEBUG || XWPrefs.getDebugEnabled( m_activity ));
|
||||||
Utils.setItemVisible( menu, R.id.games_game_invites, enable );
|
Utils.setItemVisible( menu, R.id.games_game_invites, enable );
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
enable = !m_launchedGames.contains( rowID );
|
||||||
|
Utils.setItemVisible( menu, R.id.games_game_delete, enable );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean onContextItemSelected( MenuItem item )
|
public boolean onContextItemSelected( MenuItem item )
|
||||||
|
|
Loading…
Reference in a new issue