From 70545eb3f2a4d3ac6c0341eb3d94d1c3790ef421 Mon Sep 17 00:00:00 2001 From: Eric House Date: Sun, 1 Feb 2015 22:54:15 -0800 Subject: [PATCH] more fixing assuming a connection-means-less game is solo --- .../src/org/eehouse/android/xw4/GameListItem.java | 9 ++------- .../src/org/eehouse/android/xw4/jni/GameSummary.java | 3 +-- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameListItem.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameListItem.java index 4931fd583..ce05d2331 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameListItem.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameListItem.java @@ -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 diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/GameSummary.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/GameSummary.java index fb34d1b0f..1fd1be268 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/GameSummary.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/GameSummary.java @@ -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 )