feat: 优化代码

pull/141/head
kunfei 5 years ago
parent 3dcfe33526
commit 938147107d
  1. 5
      app/src/main/java/io/legado/app/ui/book/read/config/PaddingConfigDialog.kt
  2. 5
      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 package io.legado.app.ui.book.read.config
import android.content.DialogInterface
import android.os.Bundle import android.os.Bundle
import android.util.DisplayMetrics import android.util.DisplayMetrics
import android.view.LayoutInflater import android.view.LayoutInflater
@ -47,8 +48,8 @@ class PaddingConfigDialog : DialogFragment() {
initView() initView()
} }
override fun onDestroy() { override fun onDismiss(dialog: DialogInterface) {
super.onDestroy() super.onDismiss(dialog)
ReadBookConfig.save() ReadBookConfig.save()
} }

@ -1,5 +1,6 @@
package io.legado.app.ui.book.read.config package io.legado.app.ui.book.read.config
import android.content.DialogInterface
import android.os.Bundle import android.os.Bundle
import android.util.DisplayMetrics import android.util.DisplayMetrics
import android.view.Gravity import android.view.Gravity
@ -68,8 +69,8 @@ class ReadStyleDialog : DialogFragment(), FontSelectDialog.CallBack {
initViewEvent() initViewEvent()
} }
override fun onDestroy() { override fun onDismiss(dialog: DialogInterface) {
super.onDestroy() super.onDismiss(dialog)
ReadBookConfig.save() ReadBookConfig.save()
} }

Loading…
Cancel
Save