mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-08 05:24:39 +01:00
remove unused param/ivar
This commit is contained in:
parent
386cfbda71
commit
4314a3f012
2 changed files with 9 additions and 12 deletions
|
@ -2463,7 +2463,7 @@ public class BoardDelegate extends DelegateBase
|
||||||
if ( null == mINAWrapper ) {
|
if ( null == mINAWrapper ) {
|
||||||
mINAWrapper = new InvitesNeededAlert.Wrapper( this );
|
mINAWrapper = new InvitesNeededAlert.Wrapper( this );
|
||||||
}
|
}
|
||||||
mINAWrapper.showOrHide( m_mySIS.nGuestDevs, m_mySIS.nMissing, isRematch );
|
mINAWrapper.showOrHide( m_mySIS.nMissing, isRematch );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,21 +46,20 @@ class InvitesNeededAlert {
|
||||||
|
|
||||||
Wrapper( Callbacks callbacks ) { mCallbacks = callbacks; }
|
Wrapper( Callbacks callbacks ) { mCallbacks = callbacks; }
|
||||||
|
|
||||||
void showOrHide( int nDevsSeen, int nPlayersMissing, boolean isRematch )
|
void showOrHide( int nPlayersMissing, boolean isRematch )
|
||||||
{
|
{
|
||||||
DbgUtils.assertOnUIThread();
|
DbgUtils.assertOnUIThread();
|
||||||
Log.d( TAG, "showOnceIf(nDevsSeen=%d, nPlayersMissing=%d); self: %s",
|
Log.d( TAG, "showOnceIf(nPlayersMissing=%d); self: %s", nPlayersMissing, mSelf );
|
||||||
nDevsSeen, nPlayersMissing, mSelf );
|
|
||||||
|
|
||||||
if ( null == mSelf && 0 == nPlayersMissing ) {
|
if ( null == mSelf && 0 == nPlayersMissing ) {
|
||||||
// cool: need and have nothing, so do nothing
|
// cool: need and have nothing, so do nothing
|
||||||
} else if ( 0 < nPlayersMissing && null == mSelf ) { // Need but don't have
|
} 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
|
} else if ( 0 == nPlayersMissing && null != mSelf ) { // Have and need to close
|
||||||
mSelf.close();
|
mSelf.close();
|
||||||
} else if ( null != mSelf && nPlayersMissing != mSelf.mState.mNPlayersMissing ) {
|
} else if ( null != mSelf && nPlayersMissing != mSelf.mState.mNPlayersMissing ) {
|
||||||
mSelf.close();
|
mSelf.close();
|
||||||
makeNew( nDevsSeen, nPlayersMissing, isRematch );
|
makeNew( nPlayersMissing, isRematch );
|
||||||
} else if ( null != mSelf && nPlayersMissing == mSelf.mState.mNPlayersMissing ) {
|
} else if ( null != mSelf && nPlayersMissing == mSelf.mState.mNPlayersMissing ) {
|
||||||
// nothing to do
|
// nothing to do
|
||||||
} else {
|
} 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 );
|
Log.d( TAG, "makeNew(nPlayersMissing=%d)", nPlayersMissing );
|
||||||
State state = new State( nDevsSeen, nPlayersMissing, isRematch );
|
State state = new State( nPlayersMissing, isRematch );
|
||||||
mSelf = new InvitesNeededAlert( mCallbacks.getDelegate(), state );
|
mSelf = new InvitesNeededAlert( mCallbacks.getDelegate(), state );
|
||||||
mCallbacks.getDelegate().showDialogFragment( DlgID.DLG_INVITE, 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
|
// Must be kept separate from this because gets passed as param to
|
||||||
// showDialogFragment()
|
// showDialogFragment()
|
||||||
private static class State implements Serializable {
|
private static class State implements Serializable {
|
||||||
private int mNDevsSeen;
|
|
||||||
private int mNPlayersMissing;
|
private int mNPlayersMissing;
|
||||||
private boolean mIsRematch;
|
private boolean mIsRematch;
|
||||||
|
|
||||||
State( int nDevs, int nPlayers, boolean rematch )
|
State( int nPlayers, boolean rematch )
|
||||||
{
|
{
|
||||||
mNDevsSeen = nDevs;
|
|
||||||
mNPlayersMissing = nPlayers;
|
mNPlayersMissing = nPlayers;
|
||||||
mIsRematch = rematch;
|
mIsRematch = rematch;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue