diff options
Diffstat (limited to 'app/src/main/java')
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java index e288b7cb..58a5d299 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/SettingsFragment.java @@ -416,10 +416,13 @@ public class SettingsFragment extends PreferenceCompatFragment implements Shared } for (ServerSettings ss : serverSettings.values()) { + ss.update(); + } + } + public void checkForRemoved() { + for (ServerSettings ss : serverSettings.values()) { if(!ss.update()) { - if(serversCategory != null) { - serversCategory.removePreference(ss.getScreen()); - } + serversCategory.removePreference(ss.getScreen()); } } } @@ -575,7 +578,7 @@ public class SettingsFragment extends PreferenceCompatFragment implements Shared SubsonicFragment parentFragment = context.getCurrentFragment(); if(parentFragment instanceof SettingsFragment) { SettingsFragment serverSelectionFragment = (SettingsFragment) parentFragment; - serverSelectionFragment.update(); + serverSelectionFragment.checkForRemoved(); } } }); |