aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaneren2005 <daneren2005@gmail.com>2013-06-05 13:09:56 -0600
committerdaneren2005 <daneren2005@gmail.com>2013-06-05 13:09:56 -0600
commit52d5958c3804fbe0c0908b00b2f8c2a6cbf512be (patch)
tree32512e9450e14814894f46882fe24951d3eaf5eb
parentfce836130ece465927bdd7deeef4ce2c7881a598 (diff)
downloaddsub-52d5958c3804fbe0c0908b00b2f8c2a6cbf512be.tar.gz
dsub-52d5958c3804fbe0c0908b00b2f8c2a6cbf512be.tar.bz2
dsub-52d5958c3804fbe0c0908b00b2f8c2a6cbf512be.zip
Close #132 Fix removing the active server
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/util/Util.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/util/Util.java b/subsonic-android/src/github/daneren2005/dsub/util/Util.java
index a8918923..cf0c5ee1 100644
--- a/subsonic-android/src/github/daneren2005/dsub/util/Util.java
+++ b/subsonic-android/src/github/daneren2005/dsub/util/Util.java
@@ -197,10 +197,12 @@ public final class Util {
editor.commit();
if (instance == activeInstance) {
- Util.setActiveServer(context, 0);
- }
-
- if (newInstance == activeInstance) {
+ if(instance != 1) {
+ Util.setActiveServer(context, 1);
+ } else {
+ Util.setOffline(context, true);
+ }
+ } else if (newInstance == activeInstance) {
Util.setActiveServer(context, instance);
}
}