Skip to content
Snippets Groups Projects
Commit 9244da5b authored by Nicolas Pomepuy's avatar Nicolas Pomepuy
Browse files

Fix the onboarding option to avoid adding folders to the ML

Fixes #2335
parent 7aa8b715
No related branches found
No related tags found
1 merge request!1233Fix the onboarding option to avoid adding folders to the ML
Pipeline #181574 passed with stage
in 7 minutes and 6 seconds
......@@ -32,8 +32,10 @@ import androidx.core.content.edit
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import org.videolan.medialibrary.interfaces.Medialibrary
import org.videolan.resources.AndroidDevices
import org.videolan.resources.util.getFromMl
import org.videolan.tools.*
import org.videolan.vlc.gui.onboarding.ONBOARDING_DONE_KEY
import java.io.File
import java.io.IOException
......@@ -98,7 +100,11 @@ object VersionMigration {
Log.e(this::class.java.simpleName, e.message, e)
}
}
context.getFromMl { flushUserProvidedThumbnails() }
val settings = Settings.getInstance(context)
val onboarding = !settings.getBoolean(ONBOARDING_DONE_KEY, false)
val tv = AndroidDevices.isAndroidTv || !AndroidDevices.isChromeBook && !AndroidDevices.hasTsp ||
settings.getBoolean("tv_ui", false)
if (!tv && !onboarding) context.getFromMl { flushUserProvidedThumbnails() }
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment