diff --git a/app/src/main/java/io/legado/app/ui/readbook/config/BgTextConfigDialog.kt b/app/src/main/java/io/legado/app/ui/readbook/config/BgTextConfigDialog.kt index 381c23f00..be505737d 100644 --- a/app/src/main/java/io/legado/app/ui/readbook/config/BgTextConfigDialog.kt +++ b/app/src/main/java/io/legado/app/ui/readbook/config/BgTextConfigDialog.kt @@ -1,5 +1,6 @@ package io.legado.app.ui.readbook.config +import android.content.DialogInterface import android.graphics.Color import android.os.Bundle import android.util.DisplayMetrics @@ -52,6 +53,11 @@ class BgTextConfigDialog : DialogFragment() { initView() } + override fun onDismiss(dialog: DialogInterface) { + super.onDismiss(dialog) + ReadBookConfig.save() + } + private fun initData() = with(ReadBookConfig.getConfig()) { sw_dark_status_icon.isChecked = statusIconDark() }