pull/1879/head
kunfei 3 years ago
parent 4a17a40378
commit 2aee68f5a2
  1. 5
      app/src/main/java/io/legado/app/ui/config/OtherConfigFragment.kt
  2. 4
      app/src/main/java/io/legado/app/ui/main/MainActivity.kt
  3. 4
      app/src/main/java/io/legado/app/ui/widget/checkbox/SmoothCheckBox.kt

@ -6,6 +6,7 @@ import android.content.SharedPreferences
import android.content.pm.PackageManager
import android.os.Bundle
import android.view.View
import androidx.core.view.postDelayed
import androidx.fragment.app.activityViewModels
import androidx.preference.ListPreference
import androidx.preference.Preference
@ -131,9 +132,9 @@ class OtherConfigFragment : PreferenceFragment(),
setProcessTextEnable(it.getBoolean(key, true))
}
PreferKey.showDiscovery, PreferKey.showRss -> postEvent(EventBus.NOTIFY_MAIN, true)
PreferKey.language -> listView.postDelayed({
PreferKey.language -> listView.postDelayed(1000) {
appCtx.restart()
}, 1000)
}
PreferKey.userAgent -> listView.post {
upPreferenceSummary(PreferKey.userAgent, AppConfig.userAgent)
}

@ -92,9 +92,9 @@ class MainActivity : VMBaseActivity<ActivityMainBinding, MainViewModel>(),
viewModel.upAllBookToc()
}
}
binding.viewPagerMain.postDelayed({
binding.viewPagerMain.postDelayed(3000) {
viewModel.postLoad()
}, 3000)
}
launch {
val lastBackupFile = withContext(IO) { AppWebDav.lastBackUp().getOrNull() }
?: return@launch

@ -299,10 +299,10 @@ class SmoothCheckBox @JvmOverloads constructor(
}
private fun drawTickDelayed() {
postDelayed({
postDelayed(mAnimDuration.toLong()) {
mTickDrawing = true
postInvalidate()
}, mAnimDuration.toLong())
}
}
companion object {

Loading…
Cancel
Save