Delay loading of tunnels and addressbook until router is running

This should help avoid a race condition where the RouterContext is available
before the Router is fully-initialised (see ticket #2092).
This commit is contained in:
str4d
2017-11-25 19:22:49 +00:00
parent 3aff2a7a9d
commit 5162bb604b
2 changed files with 8 additions and 2 deletions

View File

@ -151,7 +151,10 @@ public class TunnelListFragment extends Fragment implements
public void updateState(State state) {
try {
if (state == State.STOPPING || state == State.STOPPED ||
if (state == State.INIT ||
state == State.STARTING || // Wait until RouterContext is initialised
state == State.STOPPING ||
state == State.STOPPED ||
state == State.MANUAL_STOPPING ||
state == State.MANUAL_STOPPED ||
state == State.MANUAL_QUITTING ||

View File

@ -168,7 +168,10 @@ public class AddressbookFragment extends Fragment implements
try {
LoaderManager manager = getLoaderManager();
if (state == State.STOPPING || state == State.STOPPED ||
if (state == State.INIT ||
state == State.STARTING || // Wait until RouterContext is initialised
state == State.STOPPING ||
state == State.STOPPED ||
state == State.MANUAL_STOPPING ||
state == State.MANUAL_STOPPED ||
state == State.MANUAL_QUITTING ||