mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-30 10:26:58 +01:00
move creation of summary string into CurGameInfo
This commit is contained in:
parent
9beada3c4c
commit
f50a25ef3f
1 changed files with 1 additions and 25 deletions
|
@ -47,31 +47,7 @@ public class GameListAdapter implements ListAdapter {
|
|||
CurGameInfo gi = new CurGameInfo( m_context );
|
||||
XwJNI.gi_from_stream( gi, stream );
|
||||
|
||||
StringBuffer sb = new StringBuffer();
|
||||
int ii;
|
||||
for ( ii = 0; ; ) {
|
||||
sb.append( gi.players[ii].name );
|
||||
if ( ++ii >= gi.nPlayers ) {
|
||||
break;
|
||||
}
|
||||
sb.append( " vs. " );
|
||||
}
|
||||
sb.append( "\nDictionary: " );
|
||||
sb.append( gi.dictName );
|
||||
|
||||
DeviceRole role = gi.serverRole;
|
||||
if ( gi.serverRole != DeviceRole.SERVER_STANDALONE ) {
|
||||
sb.append( "\n" )
|
||||
.append( m_context.getString( R.string.role_label ) )
|
||||
.append( ": " );
|
||||
if ( role == DeviceRole.SERVER_ISSERVER ) {
|
||||
sb.append( m_context.getString( R.string.role_host ) );
|
||||
} else {
|
||||
sb.append( m_context.getString( R.string.role_guest ) );
|
||||
}
|
||||
}
|
||||
|
||||
view.setText( sb.toString() );
|
||||
view.setText( gi.summary(m_context) );
|
||||
}
|
||||
return view;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue