diff --git a/Clover/app/src/main/java/org/floens/chan/ui/activity/StartActivity.java b/Clover/app/src/main/java/org/floens/chan/ui/activity/StartActivity.java index ab5c8353..cf0fe6df 100644 --- a/Clover/app/src/main/java/org/floens/chan/ui/activity/StartActivity.java +++ b/Clover/app/src/main/java/org/floens/chan/ui/activity/StartActivity.java @@ -232,10 +232,19 @@ public class StartActivity extends AppCompatActivity implements NfcAdapter.Creat state.thread.site = site; state.thread.board = board; - Loadable boardLoadable = loadableManager.get(state.board); - Loadable threadLoadable = loadableManager.get(state.thread); + // When restarting the parcelable isn't actually deserialized, but the same object + // instance is reused. This means that the loadables we gave to the state are + // the same instance, and also have the id set etc. We don't need to query + // these from the loadablemanager. + Loadable threadLoadable; + if (state.thread.id == 0) { + threadLoadable = loadableManager.get(state.thread); + } else { + threadLoadable = state.thread; + } - return new Pair<>(boardLoadable, threadLoadable.mode == Loadable.Mode.THREAD ? threadLoadable : null); + return new Pair<>(state.board, + threadLoadable.mode == Loadable.Mode.THREAD ? threadLoadable : null); } }