remove STARTED_AGAIN event
This commit is contained in:
parent
4a96bc0d36
commit
5f37455c83
|
|
@ -73,7 +73,6 @@ public abstract class ViewControllerFragment<TState extends AbstractState, TActi
|
||||||
private Subscription viewControllerSubscription;
|
private Subscription viewControllerSubscription;
|
||||||
private TState state;
|
private TState state;
|
||||||
private boolean isStarted;
|
private boolean isStarted;
|
||||||
private boolean startedAtLeastOnce;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns specific object which contains state of ViewController.
|
* Returns specific object which contains state of ViewController.
|
||||||
|
|
@ -171,11 +170,7 @@ public abstract class ViewControllerFragment<TState extends AbstractState, TActi
|
||||||
isStarted = true;
|
isStarted = true;
|
||||||
if (viewController != null) {
|
if (viewController != null) {
|
||||||
viewController.onStart();
|
viewController.onStart();
|
||||||
if (isMenuVisible()) {
|
|
||||||
viewController.onAppear(!startedAtLeastOnce ? AppearType.STARTED : AppearType.STARTED_AGAIN);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
startedAtLeastOnce = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -208,6 +203,9 @@ public abstract class ViewControllerFragment<TState extends AbstractState, TActi
|
||||||
if (isStarted) {
|
if (isStarted) {
|
||||||
this.viewController.onStart();
|
this.viewController.onStart();
|
||||||
}
|
}
|
||||||
|
if (isMenuVisible()) {
|
||||||
|
viewController.onAppear(AppearType.STARTED);
|
||||||
|
}
|
||||||
this.viewController.getActivity().supportInvalidateOptionsMenu();
|
this.viewController.getActivity().supportInvalidateOptionsMenu();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -265,8 +263,6 @@ public abstract class ViewControllerFragment<TState extends AbstractState, TActi
|
||||||
public enum AppearType {
|
public enum AppearType {
|
||||||
// fragment just started first time
|
// fragment just started first time
|
||||||
STARTED,
|
STARTED,
|
||||||
// fragment started after stop
|
|
||||||
STARTED_AGAIN,
|
|
||||||
// fragment activated (started and menu visibility is true)
|
// fragment activated (started and menu visibility is true)
|
||||||
ACTIVATED
|
ACTIVATED
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue