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

Commit fa5bf24d authored by Michael W's avatar Michael W
Browse files

DeskClock: Fix left button display

* When adding a new timer, the left FAB will change to a "delete" icon
* Switching to another tab and returning will not display it anymore,
  resulting in the requirement to actually start a new timer to be able
  to access already running ones

* Test:
- Default FAB visibility is GONE until a valid value is inserted
- Changing from and to tab will display it again if value was already
  inserted
- Start timer
- Click "Add" (right button)
- Delete button will appear
- Delete button will be visible after swicthing tab and returning

Change-Id: I311faa96ea9e0320c630fa858227f2ad4625eb4e
parent 8ac23932
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -238,15 +238,15 @@ public final class TimerFragment extends DeskClockFragment {

    @Override
    public int getFabTargetVisibility() {
        if (mCurrentView == mTimersView) {
        final Timer timer = getTimer();
        if (mCurrentView == mTimersView) {
            if (timer == null) {
                return INVISIBLE;
            } else {
                return VISIBLE;
            }
        } else if (mCurrentView == mCreateTimerView) {
            if (mCreateTimerView.hasValidInput()) {
            if (mCreateTimerView.hasValidInput() || timer != null) {
                return VISIBLE;
            } else {
                return INVISIBLE;