pull/1129/head
deniscerri 4 months ago
parent 45fa8202d4
commit a68b5f20ae
No known key found for this signature in database
GPG Key ID: 95C43D517D830350

@ -231,4 +231,5 @@ dependencies {
implementation("commons-io:commons-io:2.5")
implementation("org.apache.commons:commons-compress:1.12")
implementation("androidx.core:core-splashscreen:1.2.0")
implementation 'com.github.woheller69:FreeDroidWarn:V1.6'
}

@ -70,6 +70,7 @@ import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.withContext
import org.woheller69.freeDroidWarn.FreeDroidWarn
import java.io.BufferedReader
import java.io.InputStreamReader
import java.io.Reader
@ -271,6 +272,7 @@ class MainActivity : BaseActivity() {
cookieViewModel.updateCookiesFile()
val intent = intent
FreeDroidWarn.showWarningOnUpgrade(this, BuildConfig.VERSION_CODE);
handleIntents(intent)
if (preferences.getBoolean("auto_update_ytdlp", false)){

@ -191,6 +191,14 @@ object FolderSettingsModule: SettingModule {
putBoolean("keep_cache", false)
}
}
(host.findPref("keep_cache") as? SwitchPreferenceCompat)?.apply {
if (newValue) {
isEnabled = false
isChecked = false
} else {
isEnabled = true
}
}
host.refreshUI()
true
}

@ -426,10 +426,10 @@ object GeneralSettingsModule : SettingModule {
"${s}\n[${entries[entryValues.indexOf(value)]}]"
}
setOnPreferenceChangeListener { _, newValue ->
summary = if (value.isNullOrBlank()) {
summary = if ((newValue as String).isBlank()) {
s
}else {
"${s}\n[${entries[entryValues.indexOf(value)]}]"
"${s}\n[${entries[entryValues.indexOf(newValue)]}]"
}
host.refreshUI()
true

Loading…
Cancel
Save