From 4f8ae02bbe5e2111f1be2ac5d29a29e62535a931 Mon Sep 17 00:00:00 2001 From: Eric House Date: Sun, 21 Mar 2021 13:25:47 -0700 Subject: [PATCH] regression: don't offer to archive archived game --- .../main/java/org/eehouse/android/xw4/GameOverAlert.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GameOverAlert.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GameOverAlert.java index 1a3d85001..de59d89bb 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GameOverAlert.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GameOverAlert.java @@ -170,15 +170,16 @@ public class GameOverAlert extends XWDialogFragment public void pendingCountChanged( int newCount ) { - if ( 0 == newCount && mHasPending ) { - mHasPending = false; + boolean hasPending = 0 < newCount; + if ( hasPending != mHasPending ) { + mHasPending = hasPending; updateForPending(); } } private void updateForPending() { - mArchiveBox.setVisibility( mHasPending ? View.GONE : View.VISIBLE ); + mArchiveBox.setVisibility( mHasPending || mInArchive ? View.GONE : View.VISIBLE ); Utils.enableAlertButton( mDialog, AlertDialog.BUTTON_NEGATIVE, !mHasPending ); }