|
|
|
@ -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); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|