more fixing assuming a connection-means-less game is solo

This commit is contained in:
Eric House 2015-02-01 22:54:15 -08:00
parent e383d9c7ad
commit 70545eb3f2
2 changed files with 3 additions and 9 deletions

View file

@ -42,7 +42,6 @@ import java.util.HashSet;
import junit.framework.Assert;
import org.eehouse.android.xw4.jni.CommsAddrRec.CommsConnType;
import org.eehouse.android.xw4.jni.GameSummary;
import org.eehouse.android.xw4.loc.LocUtils;
import org.eehouse.android.xw4.jni.CurGameInfo.DeviceRole;
@ -302,12 +301,8 @@ public class GameListItem extends LinearLayout
DateFormat.SHORT );
m_modTime.setText( df.format( new Date( lastMoveTime ) ) );
int iconID;
if ( DeviceRole.SERVER_STANDALONE == summary.serverRole ) {
iconID = R.drawable.sologame__gen;
} else {
iconID = R.drawable.multigame__gen;
}
int iconID = summary.isMultiGame() ?
R.drawable.multigame__gen : R.drawable.sologame__gen;
m_marker.setImageResource( iconID );
m_marker.setOnClickListener( new View.OnClickListener() {
@Override

View file

@ -236,8 +236,7 @@ public class GameSummary {
public boolean isMultiGame()
{
return ( null != conTypes && 0 < conTypes.size()
&& serverRole != DeviceRole.SERVER_STANDALONE );
return ( serverRole != DeviceRole.SERVER_STANDALONE );
}
private boolean isLocal( int indx )