regression: don't offer to archive archived game

This commit is contained in:
Eric House 2021-03-21 13:25:47 -07:00
parent 1869557f12
commit 4f8ae02bbe

View file

@ -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 );
}