From 700c58d6dc47aab74ba51ac9bfbd2b60650b0d38 Mon Sep 17 00:00:00 2001 From: Andy2 Date: Mon, 14 Feb 2011 07:08:35 -0800 Subject: [PATCH] drop any relayIDs for which messages didn't have any effect on the game they were passed to. This prevents duplicate messages from generating notifications over and over -- and dupes are common when messages stay on relay until the receiving game ACKs them. --- .../XWords4/src/org/eehouse/android/xw4/NetUtils.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/NetUtils.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/NetUtils.java index d875b6814..5afe6c6d2 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/NetUtils.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/NetUtils.java @@ -193,9 +193,11 @@ public class NetUtils { // if game has messages, open it and feed 'em // to it. if ( null != msgs[ii] ) { - GameUtils.feedMessages( context, ids[ii], msgs[ii] ); - DBUtils.setHasMsgs( ids[ii] ); - idsWMsgs.add( ids[ii] ); + if( GameUtils.feedMessages( context, ids[ii], + msgs[ii] ) ) { + DBUtils.setHasMsgs( ids[ii] ); + idsWMsgs.add( ids[ii] ); + } } } if ( 0 < idsWMsgs.size() ) {