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:
Eric House 2015-10-27 07:32:18 -07:00
parent 59d01dc6a2
commit a2a073067c
2 changed files with 7 additions and 7 deletions

View file

@ -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,

View file

@ -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 );
}
}