Browse Source

Fix settings

Signed-off-by: Mario Danic <mario@lovelyhq.com>
Mario Danic 6 years ago
parent
commit
2022d07671

+ 2 - 2
app/build.gradle

@@ -15,8 +15,8 @@ android {
         targetSdkVersion 27
         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
 
-        versionCode 56
-        versionName "3.0.0beta5"
+        versionCode 57
+        versionName "3.0.0beta6"
 
         flavorDimensions "default"
         renderscriptTargetApi 19

+ 2 - 0
app/src/main/java/com/nextcloud/talk/controllers/SettingsController.java

@@ -59,6 +59,7 @@ import com.nextcloud.talk.utils.database.user.UserUtils;
 import com.nextcloud.talk.utils.glide.GlideApp;
 import com.nextcloud.talk.utils.preferences.AppPreferences;
 import com.nextcloud.talk.utils.preferences.MagicUserInputModule;
+import com.nextcloud.talk.utils.singletons.ApplicationWideApiHolder;
 import com.nextcloud.talk.utils.singletons.ApplicationWideMessageHolder;
 import com.yarolegovich.mp.MaterialChoicePreference;
 import com.yarolegovich.mp.MaterialEditTextPreference;
@@ -186,6 +187,7 @@ public class SettingsController extends BaseController {
     private void getCurrentUser() {
         currentUser = userUtils.getCurrentUser();
         credentials = ApiUtils.getCredentials(currentUser.getUserId(), currentUser.getToken());
+        ncApi = ApplicationWideApiHolder.getInstance().getNcApiInstanceForAccountId(currentUser.getId(), null);
     }
 
     @Override