1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2025-01-10 20:15:54 +00:00

Don't access devices/folders when config is not loaded (fixes #876) (#924)

This commit is contained in:
Unrud 2017-07-18 05:33:20 +02:00 committed by Felix Ableitner
parent ea8621cfc3
commit d119517614
2 changed files with 2 additions and 2 deletions

View file

@ -77,7 +77,7 @@ public class DeviceListFragment extends ListFragment implements SyncthingService
*/
private void updateList() {
SyncthingActivity activity = (SyncthingActivity) getActivity();
if (activity.getApi() == null || getView() == null || activity.isFinishing())
if (activity.getApi() == null || !activity.getApi().isConfigLoaded() || getView() == null || activity.isFinishing())
return;
if (mAdapter == null) {

View file

@ -72,7 +72,7 @@ public class FolderListFragment extends ListFragment implements SyncthingService
*/
private void updateList() {
SyncthingActivity activity = (SyncthingActivity) getActivity();
if (activity.getApi() == null || getView() == null || activity.isFinishing())
if (activity.getApi() == null || !activity.getApi().isConfigLoaded() || getView() == null || activity.isFinishing())
return;
if (mAdapter == null) {