From 806c3227ca9fada659edd182f00b233ed5bdb79a Mon Sep 17 00:00:00 2001 From: kunfei Date: Fri, 30 Aug 2019 23:28:13 +0800 Subject: [PATCH] up --- .../io/legado/app/ui/readbook/config/BgTextConfigDialog.kt | 6 ++++++ 1 file changed, 6 insertions(+) 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() }