From abe7cc0a89ba48d745b67e16070ba21e99465358 Mon Sep 17 00:00:00 2001 From: Eric Kok Date: Mon, 18 Mar 2013 14:40:38 +0100 Subject: [PATCH] Fixing screen flow. --- .../com/actionbarsherlock/internal/view/menu/MenuBuilder.java | 3 ++- lite/src/org/transdroid/core/gui/TorrentsActivity.java | 1 + lite/src/org/transdroid/core/gui/TorrentsFragment.java | 3 --- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/external/JakeWharton-ActionBarSherlock/library/src/com/actionbarsherlock/internal/view/menu/MenuBuilder.java b/external/JakeWharton-ActionBarSherlock/library/src/com/actionbarsherlock/internal/view/menu/MenuBuilder.java index 179b8f03..0deeb97b 100644 --- a/external/JakeWharton-ActionBarSherlock/library/src/com/actionbarsherlock/internal/view/menu/MenuBuilder.java +++ b/external/JakeWharton-ActionBarSherlock/library/src/com/actionbarsherlock/internal/view/menu/MenuBuilder.java @@ -31,6 +31,7 @@ import android.content.pm.ResolveInfo; import android.content.res.Configuration; import android.content.res.Resources; import android.graphics.drawable.Drawable; +import android.os.Build; import android.os.Bundle; import android.os.Parcelable; import android.util.SparseArray; @@ -352,7 +353,7 @@ public class MenuBuilder implements Menu { SparseArray viewStates = states.getSparseParcelableArray( getActionViewStatesKey()); - + final int itemCount = size(); for (int i = 0; i < itemCount; i++) { final MenuItem item = getItem(i); diff --git a/lite/src/org/transdroid/core/gui/TorrentsActivity.java b/lite/src/org/transdroid/core/gui/TorrentsActivity.java index 0493cc99..eee5e707 100644 --- a/lite/src/org/transdroid/core/gui/TorrentsActivity.java +++ b/lite/src/org/transdroid/core/gui/TorrentsActivity.java @@ -115,6 +115,7 @@ public class TorrentsActivity extends SherlockFragmentActivity implements OnNavi // Add status types directly to the action bar spinner navigationSpinnerAdapter.updateStatusTypes(StatusType.getAllStatusTypes(this)); } + currentFilter = StatusType.getShowAllType(this); // Connect to the last used server ServerSetting lastUsed = applicationSettings.getLastUsedServer(); diff --git a/lite/src/org/transdroid/core/gui/TorrentsFragment.java b/lite/src/org/transdroid/core/gui/TorrentsFragment.java index d0bbeaa1..fc8d6b0d 100644 --- a/lite/src/org/transdroid/core/gui/TorrentsFragment.java +++ b/lite/src/org/transdroid/core/gui/TorrentsFragment.java @@ -12,7 +12,6 @@ import org.transdroid.core.R; import org.transdroid.core.gui.lists.TorrentsAdapter; import org.transdroid.core.gui.lists.TorrentsAdapter_; import org.transdroid.core.gui.navigation.NavigationFilter; -import org.transdroid.core.gui.navigation.StatusType; import org.transdroid.daemon.Torrent; import android.view.View; @@ -79,8 +78,6 @@ public class TorrentsFragment extends SherlockFragment { */ public void applyFilter(NavigationFilter currentFilter) { this.currentFilter = currentFilter; - if (this.currentFilter == null) - this.currentFilter = StatusType.getShowAllType(getActivity()); if (torrents != null) { // Build a local list of torrents that match the selected navigation filter ArrayList filteredTorrents = new ArrayList();