mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-09 05:24:44 +01:00
fix chat view not being opened if move had arrived after chat by
removing unneeded variable whose presence was clearing flags.
This commit is contained in:
parent
2aa9740814
commit
26114f83a6
3 changed files with 6 additions and 25 deletions
|
@ -142,7 +142,7 @@ public class DBUtils {
|
|||
DBHelper.ROOMNAME, DBHelper.RELAYID,
|
||||
/*DBHelper.SMSPHONE,*/ DBHelper.SEED,
|
||||
DBHelper.DICTLANG, DBHelper.GAMEID,
|
||||
DBHelper.SCORES, DBHelper.HASMSGS,
|
||||
DBHelper.SCORES,
|
||||
DBHelper.LASTPLAY_TIME, DBHelper.REMOTEDEVS,
|
||||
DBHelper.LASTMOVE, DBHelper.NPACKETSPENDING,
|
||||
DBHelper.EXTRAS,
|
||||
|
@ -255,11 +255,6 @@ public class DBUtils {
|
|||
col = cursor.getColumnIndex( DBHelper.SERVERROLE );
|
||||
tmp = cursor.getInt( col );
|
||||
summary.serverRole = CurGameInfo.DeviceRole.values()[tmp];
|
||||
|
||||
col = cursor.getColumnIndex( DBHelper.HASMSGS );
|
||||
if ( col >= 0 ) {
|
||||
summary.pendingMsgLevel = cursor.getInt( col );
|
||||
}
|
||||
}
|
||||
cursor.close();
|
||||
db.close();
|
||||
|
@ -307,7 +302,6 @@ public class DBUtils {
|
|||
values.put( DBHelper.NEXTNAG, nextNag );
|
||||
|
||||
values.put( DBHelper.DICTLIST, summary.dictNames(DICTS_SEP) );
|
||||
values.put( DBHelper.HASMSGS, summary.pendingMsgLevel );
|
||||
if ( null != inviteID ) {
|
||||
values.put( DBHelper.INVITEID, inviteID );
|
||||
}
|
||||
|
|
|
@ -162,13 +162,6 @@ public class GameUtils {
|
|||
}
|
||||
}
|
||||
|
||||
private static GameSummary summarizeAndClose( Context context,
|
||||
GameLock lock,
|
||||
int gamePtr, CurGameInfo gi )
|
||||
{
|
||||
return summarizeAndClose( context, lock, gamePtr, gi, null );
|
||||
}
|
||||
|
||||
private static int setFromFeedImpl( FeedUtilsImpl feedImpl )
|
||||
{
|
||||
int result = GameSummary.MSG_FLAGS_NONE;
|
||||
|
@ -185,17 +178,12 @@ public class GameUtils {
|
|||
}
|
||||
|
||||
private static GameSummary summarizeAndClose( Context context,
|
||||
GameLock lock,
|
||||
int gamePtr, CurGameInfo gi,
|
||||
FeedUtilsImpl feedImpl )
|
||||
GameLock lock, int gamePtr,
|
||||
CurGameInfo gi )
|
||||
{
|
||||
GameSummary summary = new GameSummary( context, gi );
|
||||
XwJNI.game_summarize( gamePtr, summary );
|
||||
|
||||
if ( null != feedImpl ) {
|
||||
summary.pendingMsgLevel |= setFromFeedImpl( feedImpl );
|
||||
}
|
||||
|
||||
DBUtils.saveSummary( context, lock, summary );
|
||||
|
||||
XwJNI.game_dispose( gamePtr );
|
||||
|
@ -923,12 +911,13 @@ public class GameUtils {
|
|||
}
|
||||
|
||||
saveGame( context, gamePtr, gi, lock, false );
|
||||
summarizeAndClose( context, lock, gamePtr, gi, feedImpl );
|
||||
summarizeAndClose( context, lock, gamePtr, gi );
|
||||
|
||||
int flags = setFromFeedImpl( feedImpl );
|
||||
if ( GameSummary.MSG_FLAGS_NONE != flags ) {
|
||||
draw = true;
|
||||
DBUtils.setMsgFlags( rowid, flags );
|
||||
int curFlags = DBUtils.getMsgFlags( context, rowid );
|
||||
DBUtils.setMsgFlags( rowid, flags | curFlags );
|
||||
}
|
||||
}
|
||||
lock.unlock();
|
||||
|
|
|
@ -63,7 +63,6 @@ public class GameSummary {
|
|||
public String roomName;
|
||||
public String relayID;
|
||||
public int seed;
|
||||
public int pendingMsgLevel;
|
||||
public long modtime;
|
||||
public int gameID;
|
||||
public String[] remoteDevs; // BTAddrs and phone numbers
|
||||
|
@ -83,7 +82,6 @@ public class GameSummary {
|
|||
|
||||
public GameSummary( Context context ) {
|
||||
m_context = context;
|
||||
pendingMsgLevel = 0;
|
||||
gameID = 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue