mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-09 05:24:44 +01:00
trivial refactor
This commit is contained in:
parent
77315b50ba
commit
2f579832b4
1 changed files with 12 additions and 7 deletions
|
@ -717,7 +717,7 @@ public class GamesListDelegate extends ListDelegateBase
|
||||||
String name = m_namer.getName();
|
String name = m_namer.getName();
|
||||||
DBUtils.setGroupName( m_activity,
|
DBUtils.setGroupName( m_activity,
|
||||||
m_groupid, name );
|
m_groupid, name );
|
||||||
m_adapter.reloadGame( m_rowid );
|
reloadGame( m_rowid );
|
||||||
mkListAdapter();
|
mkListAdapter();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -965,7 +965,7 @@ public class GamesListDelegate extends ListDelegateBase
|
||||||
m_launchedGames.clear();
|
m_launchedGames.clear();
|
||||||
Assert.assertNotNull( intent );
|
Assert.assertNotNull( intent );
|
||||||
invalRelayIDs( intent.getStringArrayExtra( RELAYIDS_EXTRA ) );
|
invalRelayIDs( intent.getStringArrayExtra( RELAYIDS_EXTRA ) );
|
||||||
m_adapter.reloadGame( intent.getLongExtra( ROWID_EXTRA, -1 ) );
|
reloadGame( intent.getLongExtra( ROWID_EXTRA, -1 ) );
|
||||||
tryStartsFromIntent( intent );
|
tryStartsFromIntent( intent );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1081,7 +1081,7 @@ public class GamesListDelegate extends ListDelegateBase
|
||||||
if ( DBUtils.ROWIDS_ALL == rowid ) { // all changed
|
if ( DBUtils.ROWIDS_ALL == rowid ) { // all changed
|
||||||
mkListAdapter();
|
mkListAdapter();
|
||||||
} else {
|
} else {
|
||||||
m_adapter.reloadGame( rowid );
|
reloadGame( rowid );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GAME_CREATED:
|
case GAME_CREATED:
|
||||||
|
@ -1210,9 +1210,7 @@ public class GamesListDelegate extends ListDelegateBase
|
||||||
long curID = (Long)params[0];
|
long curID = (Long)params[0];
|
||||||
long newid = GameUtils.dupeGame( m_activity, curID );
|
long newid = GameUtils.dupeGame( m_activity, curID );
|
||||||
m_selGames.add( newid );
|
m_selGames.add( newid );
|
||||||
if ( null != m_adapter ) {
|
reloadGame( newid );
|
||||||
m_adapter.reloadGame( newid );
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NEW_GAME_PRESSED:
|
case NEW_GAME_PRESSED:
|
||||||
|
@ -1619,6 +1617,13 @@ public class GamesListDelegate extends ListDelegateBase
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void reloadGame( long rowID )
|
||||||
|
{
|
||||||
|
if ( null != m_adapter ) {
|
||||||
|
m_adapter.reloadGame( rowID );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private boolean handleToggleItem( int itemID, View target )
|
private boolean handleToggleItem( int itemID, View target )
|
||||||
{
|
{
|
||||||
boolean handled;
|
boolean handled;
|
||||||
|
@ -1898,7 +1903,7 @@ public class GamesListDelegate extends ListDelegateBase
|
||||||
long[] rowids = DBUtils.getRowIDsFor( m_activity, relayID );
|
long[] rowids = DBUtils.getRowIDsFor( m_activity, relayID );
|
||||||
if ( null != rowids ) {
|
if ( null != rowids ) {
|
||||||
for ( long rowid : rowids ) {
|
for ( long rowid : rowids ) {
|
||||||
m_adapter.reloadGame( rowid );
|
reloadGame( rowid );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue