mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-27 09:58:45 +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,
|
||||
LastMoveInfo lmi )
|
||||
{
|
||||
Intent intent = GamesListDelegate.makeRowidIntent( context, rowid );
|
||||
String msg = "";
|
||||
if ( null != lmi ) {
|
||||
msg = lmi.format( context );
|
||||
if ( null == lmi ) {
|
||||
DbgUtils.logf( "postMoveNotification: posting nothing for lack"
|
||||
+ " of lmi" );
|
||||
} 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,
|
||||
|
|
Loading…
Reference in a new issue