From 52d5958c3804fbe0c0908b00b2f8c2a6cbf512be Mon Sep 17 00:00:00 2001 From: daneren2005 Date: Wed, 5 Jun 2013 13:09:56 -0600 Subject: Close #132 Fix removing the active server --- subsonic-android/src/github/daneren2005/dsub/util/Util.java | 10 ++++++---- 1 file 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); } } -- cgit v1.2.3