From 4314a3f012a0ab65eef39a6ded80a4f102d19787 Mon Sep 17 00:00:00 2001 From: Eric House Date: Sat, 28 Nov 2020 13:03:17 -0800 Subject: [PATCH] remove unused param/ivar --- .../eehouse/android/xw4/BoardDelegate.java | 2 +- .../android/xw4/InvitesNeededAlert.java | 19 ++++++++----------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BoardDelegate.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BoardDelegate.java index 525e0180d..aded81bc1 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BoardDelegate.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BoardDelegate.java @@ -2463,7 +2463,7 @@ public class BoardDelegate extends DelegateBase if ( null == mINAWrapper ) { mINAWrapper = new InvitesNeededAlert.Wrapper( this ); } - mINAWrapper.showOrHide( m_mySIS.nGuestDevs, m_mySIS.nMissing, isRematch ); + mINAWrapper.showOrHide( m_mySIS.nMissing, isRematch ); } } diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/InvitesNeededAlert.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/InvitesNeededAlert.java index 9f6d84f67..b95452f31 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/InvitesNeededAlert.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/InvitesNeededAlert.java @@ -46,21 +46,20 @@ class InvitesNeededAlert { Wrapper( Callbacks callbacks ) { mCallbacks = callbacks; } - void showOrHide( int nDevsSeen, int nPlayersMissing, boolean isRematch ) + void showOrHide( int nPlayersMissing, boolean isRematch ) { DbgUtils.assertOnUIThread(); - Log.d( TAG, "showOnceIf(nDevsSeen=%d, nPlayersMissing=%d); self: %s", - nDevsSeen, nPlayersMissing, mSelf ); + Log.d( TAG, "showOnceIf(nPlayersMissing=%d); self: %s", nPlayersMissing, mSelf ); if ( null == mSelf && 0 == nPlayersMissing ) { // cool: need and have nothing, so do nothing } else if ( 0 < nPlayersMissing && null == mSelf ) { // Need but don't have - makeNew( nDevsSeen, nPlayersMissing, isRematch ); + makeNew( nPlayersMissing, isRematch ); } else if ( 0 == nPlayersMissing && null != mSelf ) { // Have and need to close mSelf.close(); } else if ( null != mSelf && nPlayersMissing != mSelf.mState.mNPlayersMissing ) { mSelf.close(); - makeNew( nDevsSeen, nPlayersMissing, isRematch ); + makeNew( nPlayersMissing, isRematch ); } else if ( null != mSelf && nPlayersMissing == mSelf.mState.mNPlayersMissing ) { // nothing to do } else { @@ -84,10 +83,10 @@ class InvitesNeededAlert { } } - private void makeNew( int nDevsSeen, int nPlayersMissing, boolean isRematch ) + private void makeNew( int nPlayersMissing, boolean isRematch ) { - Log.d( TAG, "makeNew(nDevsSeen=%d, nPlayersMissing=%d)", nDevsSeen, nPlayersMissing ); - State state = new State( nDevsSeen, nPlayersMissing, isRematch ); + Log.d( TAG, "makeNew(nPlayersMissing=%d)", nPlayersMissing ); + State state = new State( nPlayersMissing, isRematch ); mSelf = new InvitesNeededAlert( mCallbacks.getDelegate(), state ); mCallbacks.getDelegate().showDialogFragment( DlgID.DLG_INVITE, state ); } @@ -96,13 +95,11 @@ class InvitesNeededAlert { // Must be kept separate from this because gets passed as param to // showDialogFragment() private static class State implements Serializable { - private int mNDevsSeen; private int mNPlayersMissing; private boolean mIsRematch; - State( int nDevs, int nPlayers, boolean rematch ) + State( int nPlayers, boolean rematch ) { - mNDevsSeen = nDevs; mNPlayersMissing = nPlayers; mIsRematch = rematch; }