add api
This commit is contained in:
@@ -100,11 +100,15 @@ public class SocketManager implements IMogoSocketManager, OnSocketReceiveCallbac
|
||||
}
|
||||
cacheLastReceivedMsgId( msgId );
|
||||
}
|
||||
Object object = null;
|
||||
while ( iterator.hasNext() ) {
|
||||
IMogoOnMessageListener listener = iterator.next();
|
||||
if ( object == null ) {
|
||||
object = GsonUtil.objectFromJson( payload.getPayload().toStringUtf8(), listener.target() );
|
||||
}
|
||||
if ( listener != null ) {
|
||||
Logger.d( TAG, "received msg == %s, msgId = %s", payload.getPayload().toStringUtf8(), msgId );
|
||||
listener.onMsgReceived( GsonUtil.objectFromJson( payload.getPayload().toStringUtf8(), listener.target() ) );
|
||||
Logger.d( TAG, "received msgId = %s", msgId );
|
||||
listener.onMsgReceived( object );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user