mirror of https://github.com/M66B/FairEmail.git
Optimization
This commit is contained in:
parent
c8efa741fa
commit
5067f4b1f5
|
@ -66,12 +66,14 @@ public class TwoStateOwner implements LifecycleOwner {
|
|||
}
|
||||
|
||||
void start() {
|
||||
if (!registry.getCurrentState().equals(Lifecycle.State.DESTROYED))
|
||||
Lifecycle.State state = registry.getCurrentState();
|
||||
if (!state.equals(Lifecycle.State.STARTED) && !state.equals(Lifecycle.State.DESTROYED))
|
||||
setState(Lifecycle.State.STARTED);
|
||||
}
|
||||
|
||||
void stop() {
|
||||
if (!registry.getCurrentState().equals(Lifecycle.State.DESTROYED))
|
||||
Lifecycle.State state = registry.getCurrentState();
|
||||
if (!state.equals(Lifecycle.State.CREATED) && !state.equals(Lifecycle.State.DESTROYED))
|
||||
setState(Lifecycle.State.CREATED);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue