Two state owner state fix

This commit is contained in:
M66B
2020-07-26 21:33:12 +02:00
parent 1788d04e64
commit 9518d0adc9

View File

@@ -89,10 +89,11 @@ public class TwoStateOwner implements LifecycleOwner {
void destroy() {
Lifecycle.State state = registry.getCurrentState();
if (!state.equals(Lifecycle.State.CREATED))
setState(Lifecycle.State.CREATED);
if (!state.equals(Lifecycle.State.DESTROYED))
if (!state.equals(Lifecycle.State.DESTROYED)) {
if (!state.equals(Lifecycle.State.CREATED))
setState(Lifecycle.State.CREATED);
setState(Lifecycle.State.DESTROYED);
}
}
@NonNull