Release 1.2.0

This commit is contained in:
Thomas 2020-10-03 11:44:00 +02:00
parent c50a587250
commit 8ce7eb386f
3 changed files with 14 additions and 2 deletions

View File

@ -11,7 +11,7 @@ android {
minSdkVersion 21
targetSdkVersion 30
versionCode 11
versionName "1.2.0-beta-1"
versionName "1.2.0"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

View File

@ -43,6 +43,10 @@ import com.google.android.material.bottomnavigation.BottomNavigationView;
import org.jetbrains.annotations.NotNull;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;
import app.fedilab.fedilabtube.client.RetrofitPeertubeAPI;
import app.fedilab.fedilabtube.client.data.AccountData.Account;
import app.fedilab.fedilabtube.client.entities.Error;
@ -101,6 +105,15 @@ public class MainActivity extends AppCompatActivity {
SharedPreferences.Editor editor = sharedpreferences.edit();
editor.putString(Helper.PREF_KEY_ID, account.getId());
editor.putString(Helper.PREF_KEY_NAME, account.getUsername());
//Sync languages from server
List<String> videoLanguageServer = userMe.getVideoLanguages();
Set<String> videoLanguageServerSet = new TreeSet<>(videoLanguageServer);
videoLanguageServerSet.addAll(videoLanguageServer);
Set<String> videoLanguageLocal = sharedpreferences.getStringSet(getString(R.string.set_video_language_choice), null);
if( videoLanguageServerSet.size() > 0 && videoLanguageLocal != null) {
videoLanguageServer.addAll(videoLanguageLocal);
}
editor.putStringSet(getString(R.string.set_video_language_choice), videoLanguageServerSet);
editor.apply();
}
} catch (Error error) {

View File

@ -17,7 +17,6 @@ import java.util.Arrays;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;