mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-30 08:34:16 +01:00
don't show empty messages
Need to remember that jsonobj.optString() returns "" by default
This commit is contained in:
parent
971d267460
commit
c311eac65e
1 changed files with 2 additions and 2 deletions
|
@ -691,9 +691,9 @@ public class MQTTUtils extends Thread
|
|||
private void postNotification( MessagePair pair ) throws JSONException
|
||||
{
|
||||
JSONObject obj = new JSONObject( new String(pair.mPacket) );
|
||||
String msg = obj.optString( "msg" );
|
||||
String msg = obj.optString( "msg", null );
|
||||
if ( null != msg ) {
|
||||
String title = obj.optString( "title" );
|
||||
String title = obj.optString( "title", null );
|
||||
if ( null == title ) {
|
||||
title = LocUtils.getString( mContext, R.string.remote_msg_title );
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue