Fix: White display

When newly installing the app, it would have an all white screen because 
the vibrant and dominant color would only be set when changing themes. 
This problem emerged within the `fix/code` branch and was not published 
anywhere yet.
This commit is contained in:
Finn M Glas 2020-06-21 13:18:51 +02:00
parent 56fb5a063d
commit b01ddf2ae6
No known key found for this signature in database
GPG key ID: 902A30146014DFBF

View file

@ -253,13 +253,22 @@ fun loadSettings(){
fun resetSettings(context: Context) : MutableList<String>{ fun resetSettings(context: Context) : MutableList<String>{
// set default theme
saveTheme("finn")
val defaultList :MutableList<String> = mutableListOf<String>() val defaultList :MutableList<String> = mutableListOf<String>()
val editor = launcherPreferences.edit() val editor = launcherPreferences.edit()
// set default theme
dominantColor = context.resources.getColor(R.color.finnmglasTheme_background_color)
vibrantColor = context.resources.getColor(R.color.finnmglasTheme_accent_color)
launcherPreferences.edit()
.putString("background_uri", "")
.putInt("custom_dominant", dominantColor)
.putInt("custom_vibrant", vibrantColor)
.apply()
saveTheme("finn")
val (chosenUpName, chosenUpPackage) = pickDefaultApp( val (chosenUpName, chosenUpPackage) = pickDefaultApp(
"action_upApp", "action_upApp",
context context