Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
some misc clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesmadere committed Nov 17, 2013
1 parent 6b73d6d commit 49fd746
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
Expand Up @@ -7,7 +7,6 @@
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.widget.Toast;
import com.actionbarsherlock.app.SherlockFragmentActivity;
import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuInflater;
import com.actionbarsherlock.view.MenuItem;
Expand Down Expand Up @@ -434,8 +433,7 @@ protected void onBoardClick(final PositionView positionPrevious, final PositionV
if (board.move(previous, current))
{
flush();
final SherlockFragmentActivity activity = getSherlockActivity();
activity.supportInvalidateOptionsMenu();
getSherlockActivity().supportInvalidateOptionsMenu();

final int boardStatus = ((Board) board).isBoardInCheckOrCheckmate();

Expand Down
Expand Up @@ -56,12 +56,6 @@ public abstract class GenericGameFragment extends SherlockFragment
protected Game game;


/**
* The arguments passed in to this Fragment during it's creation.
*/
private Bundle arguments;


/**
* JSONObject downloaded from the server that represents the board.
*/
Expand Down Expand Up @@ -204,6 +198,7 @@ public View onCreateView(final LayoutInflater inflater, final ViewGroup containe
public void onActivityCreated(final Bundle savedInstanceState)
{
super.onActivityCreated(savedInstanceState);
final Bundle arguments = getArguments();

if (arguments == null || arguments.isEmpty())
// Check the arguments given to this Fragment. This Fragment requires
Expand Down Expand Up @@ -347,7 +342,6 @@ public void onAttach(final Activity activity)
{
super.onAttach(activity);
listeners = (Listeners) activity;
arguments = getArguments();
}


Expand Down Expand Up @@ -391,6 +385,7 @@ public void onCreateOptionsMenu(final Menu menu, final MenuInflater inflater)
// Here we only allow the Skip Move or Forfeit Game Action Bar buttons
// to be shown if the game we're displaying in this Fragment has a game
// ID.
final Bundle arguments = getArguments();
final String gameId = arguments.getString(KEY_GAME_ID);

if (!Utilities.validString(gameId) || !Game.isIdValid(gameId))
Expand Down

0 comments on commit 49fd746

Please sign in to comment.