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.
This commit is contained in:
Andy2 2011-02-14 07:08:35 -08:00
parent 688fadb965
commit 700c58d6dc

View file

@ -193,11 +193,13 @@ public class NetUtils {
// if game has messages, open it and feed 'em // if game has messages, open it and feed 'em
// to it. // to it.
if ( null != msgs[ii] ) { if ( null != msgs[ii] ) {
GameUtils.feedMessages( context, ids[ii], msgs[ii] ); if( GameUtils.feedMessages( context, ids[ii],
msgs[ii] ) ) {
DBUtils.setHasMsgs( ids[ii] ); DBUtils.setHasMsgs( ids[ii] );
idsWMsgs.add( ids[ii] ); idsWMsgs.add( ids[ii] );
} }
} }
}
if ( 0 < idsWMsgs.size() ) { if ( 0 < idsWMsgs.size() ) {
ids = new String[idsWMsgs.size()]; ids = new String[idsWMsgs.size()];
result = idsWMsgs.toArray( ids ); result = idsWMsgs.toArray( ids );