mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-06 20:45:54 +01:00
fix assertion due to lock conflict between game config and context
menu updating by having updating not insist on getting the lock.
This commit is contained in:
parent
59d01dc6a2
commit
a2a073067c
2 changed files with 7 additions and 7 deletions
|
@ -2535,9 +2535,10 @@ public class BoardDelegate extends DelegateBase
|
|||
m_summary );
|
||||
}
|
||||
|
||||
public static boolean rematchSupported( GameSummary summary )
|
||||
public static boolean rematchSupported( Context context, long rowID )
|
||||
{
|
||||
return rematchSupported( null, summary );
|
||||
GameSummary summary = DBUtils.getSummary( context, rowID, 1 );
|
||||
return null != summary && rematchSupported( null, summary );
|
||||
}
|
||||
|
||||
private static boolean rematchSupported( Context context,
|
||||
|
|
|
@ -1358,9 +1358,8 @@ public class GamesListDelegate extends ListDelegateBase
|
|||
// Rematch supported if there's one game selected
|
||||
enable = 1 == nGamesSelected;
|
||||
if ( enable ) {
|
||||
GameSummary summary = DBUtils.getSummary( m_activity,
|
||||
getSelRowIDs()[0] );
|
||||
enable = BoardDelegate.rematchSupported( summary );
|
||||
enable = BoardDelegate.rematchSupported( m_activity,
|
||||
getSelRowIDs()[0] );
|
||||
}
|
||||
Utils.setItemVisible( menu, R.id.games_game_rematch, enable );
|
||||
|
||||
|
@ -1544,8 +1543,8 @@ public class GamesListDelegate extends ListDelegateBase
|
|||
Utils.setItemVisible( menu, hideId, false );
|
||||
|
||||
if ( 0 != gameRowID ) {
|
||||
GameSummary summary = DBUtils.getSummary(m_activity, gameRowID);
|
||||
boolean enable = BoardDelegate.rematchSupported( summary );
|
||||
boolean enable = BoardDelegate.rematchSupported( m_activity,
|
||||
gameRowID );
|
||||
Utils.setItemVisible( menu, R.id.games_game_rematch, enable );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue