Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 62fb78c4 authored by Jorge Ruesga's avatar Jorge Ruesga
Browse files

cmfm: Fix clear history button visibility logic



Change-Id: I736a27d63363ce7d5ddbc871a6a5d74a40794113
Signed-off-by: default avatarJorge Ruesga <jorge@ruesga.com>
parent 4191e0d9
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -873,7 +873,7 @@ public class NavigationActivity extends Activity
        mDrawerHistory.addView(view, 0);

        // Show clear button if history tab is selected
        mClearHistory.setVisibility(mHistoryTab.getVisibility());
        mClearHistory.setVisibility(mHistoryTab.isSelected() ? View.VISIBLE : View.GONE);
    }

    /**
@@ -1999,6 +1999,8 @@ public class NavigationActivity extends Activity
            }

            //Navigate
            boolean clearHistory = mHistoryTab.isSelected() && mHistory.size() > 0;
            mClearHistory.setVisibility(clearHistory ? View.VISIBLE : View.GONE);
            return true;

        } catch (Throwable ex) {
@@ -2053,13 +2055,13 @@ public class NavigationActivity extends Activity
            }
        }

        //Extract a history from the
        if (this.mHistory.size() > 0) {
        //Navigate to history
        if (this.mHistory.size() > 0) {
            return navigateToHistory(this.mHistory.get(this.mHistory.size() - 1));
        }

        //Nothing to apply
        mClearHistory.setVisibility(View.GONE);
        return false;
    }