From 938147107d884a79b0c3ca133a7387e58a94ddda Mon Sep 17 00:00:00 2001 From: kunfei Date: Fri, 6 Mar 2020 21:07:09 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/legado/app/ui/book/read/config/PaddingConfigDialog.kt | 5 +++-- .../io/legado/app/ui/book/read/config/ReadStyleDialog.kt | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/PaddingConfigDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/PaddingConfigDialog.kt index 6ce9dfc03..a19789fd3 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/PaddingConfigDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/PaddingConfigDialog.kt @@ -1,5 +1,6 @@ package io.legado.app.ui.book.read.config +import android.content.DialogInterface import android.os.Bundle import android.util.DisplayMetrics import android.view.LayoutInflater @@ -47,8 +48,8 @@ class PaddingConfigDialog : DialogFragment() { initView() } - override fun onDestroy() { - super.onDestroy() + override fun onDismiss(dialog: DialogInterface) { + super.onDismiss(dialog) ReadBookConfig.save() } diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt index 71604dfb8..81485083e 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/ReadStyleDialog.kt @@ -1,5 +1,6 @@ package io.legado.app.ui.book.read.config +import android.content.DialogInterface import android.os.Bundle import android.util.DisplayMetrics import android.view.Gravity @@ -68,8 +69,8 @@ class ReadStyleDialog : DialogFragment(), FontSelectDialog.CallBack { initViewEvent() } - override fun onDestroy() { - super.onDestroy() + override fun onDismiss(dialog: DialogInterface) { + super.onDismiss(dialog) ReadBookConfig.save() }