mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
don't post notification if there's no explanation to be offered. I've
been seeing ghost notifications where there should be none; this will fix that, but I need to observe that it doesn't remove notifications that are needed.
This commit is contained in:
parent
4cd75abaa9
commit
e3b5848d5d
1 changed files with 12 additions and 7 deletions
|
@ -1031,14 +1031,19 @@ public class GameUtils {
|
||||||
public static void postMoveNotification( Context context, long rowid,
|
public static void postMoveNotification( Context context, long rowid,
|
||||||
LastMoveInfo lmi )
|
LastMoveInfo lmi )
|
||||||
{
|
{
|
||||||
Intent intent = GamesListDelegate.makeRowidIntent( context, rowid );
|
if ( null == lmi ) {
|
||||||
String msg = "";
|
DbgUtils.logf( "postMoveNotification: posting nothing for lack"
|
||||||
if ( null != lmi ) {
|
+ " of lmi" );
|
||||||
msg = lmi.format( context );
|
} else {
|
||||||
|
Intent intent = GamesListDelegate.makeRowidIntent( context, rowid );
|
||||||
|
String msg = "";
|
||||||
|
if ( null != lmi ) {
|
||||||
|
msg = lmi.format( context );
|
||||||
|
}
|
||||||
|
String title = LocUtils.getString( context, R.string.notify_title_fmt,
|
||||||
|
getName( context, rowid ) );
|
||||||
|
Utils.postNotification( context, intent, title, msg, (int)rowid );
|
||||||
}
|
}
|
||||||
String title = LocUtils.getString( context, R.string.notify_title_fmt,
|
|
||||||
getName( context, rowid ) );
|
|
||||||
Utils.postNotification( context, intent, title, msg, (int)rowid );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void tellDied( Context context, GameLock lock,
|
private static void tellDied( Context context, GameLock lock,
|
||||||
|
|
Loading…
Reference in a new issue