mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-06 20:45:54 +01:00
add groups info cache inval so when empty group gets a new game it
grows an expand button
This commit is contained in:
parent
8dd1771a37
commit
25d4b0a375
2 changed files with 7 additions and 5 deletions
|
@ -814,7 +814,7 @@ public class DBUtils {
|
|||
lock = new GameLock( rowid, true ).lock();
|
||||
notifyListeners( rowid, GameChangeType.GAME_CREATED );
|
||||
}
|
||||
|
||||
invalGroupsCache();
|
||||
return lock;
|
||||
} // saveNewGame
|
||||
|
||||
|
@ -893,8 +893,8 @@ public class DBUtils {
|
|||
db.delete( DBHelper.TABLE_NAME_SUM, selection, null );
|
||||
db.close();
|
||||
}
|
||||
invalGroupsCache();
|
||||
notifyListeners( lock.getRowid(), GameChangeType.GAME_DELETED );
|
||||
invalGroupsCache();
|
||||
}
|
||||
|
||||
public static int getVisID( Context context, long rowid )
|
||||
|
|
|
@ -114,7 +114,9 @@ public class GamesListDelegate extends ListDelegateBase
|
|||
alist.add( new GroupRec( groupID, ii ) );
|
||||
|
||||
if ( ggi.m_expanded ) {
|
||||
alist.addAll( makeChildren( groupID ) );
|
||||
List<Object> children = makeChildren( groupID );
|
||||
alist.addAll( children );
|
||||
Assert.assertTrue( nKids == children.size() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -342,7 +344,7 @@ public class GamesListDelegate extends ListDelegateBase
|
|||
for ( long row : rows ) {
|
||||
alist.add( new GameRec( row ) );
|
||||
}
|
||||
DbgUtils.logf( "makeChildren(%d) => %d kids", groupID, alist.size() );
|
||||
DbgUtils.logf( "GamesListDelegate.makeChildren(%d) => %d kids", groupID, alist.size() );
|
||||
return alist;
|
||||
}
|
||||
|
||||
|
@ -864,7 +866,7 @@ public class GamesListDelegate extends ListDelegateBase
|
|||
//////////////////////////////////////////////////////////////////////
|
||||
public void gameSaved( final long rowid, final GameChangeType change )
|
||||
{
|
||||
runOnUiThread( new Runnable() {
|
||||
post( new Runnable() {
|
||||
public void run() {
|
||||
switch( change ) {
|
||||
case GAME_DELETED:
|
||||
|
|
Loading…
Add table
Reference in a new issue