加回共用布局 #189
This commit is contained in:
@@ -33,6 +33,7 @@ import splitties.init.appCtx
|
||||
import java.io.File
|
||||
import kotlin.String
|
||||
import androidx.core.graphics.drawable.toDrawable
|
||||
import io.legado.app.utils.putPrefBoolean
|
||||
|
||||
/**
|
||||
* 阅读界面配置
|
||||
|
||||
@@ -29,6 +29,11 @@ import io.legado.app.utils.viewbindingdelegate.viewBinding
|
||||
class ReadStyleDialog : BaseBottomSheetDialogFragment(R.layout.dialog_read_book_style),
|
||||
FontSelectDialog.CallBack {
|
||||
|
||||
sealed class ReadStyleItem {
|
||||
data class ConfigItem(val config: ReadBookConfig.Config) : ReadStyleItem()
|
||||
data object ShareLayoutItem : ReadStyleItem()
|
||||
}
|
||||
|
||||
private val binding by viewBinding(DialogReadBookStyleBinding::bind)
|
||||
private val callBack get() = activity as? ReadBookActivity
|
||||
private lateinit var styleAdapter: StyleAdapter
|
||||
@@ -132,7 +137,7 @@ class ReadStyleDialog : BaseBottomSheetDialogFragment(R.layout.dialog_read_book_
|
||||
ReadBook.loadContent(false)
|
||||
}
|
||||
|
||||
cbShareLayout.setOnCheckedChangeListener { _, isChecked ->
|
||||
cbShareLayout.addOnCheckedChangeListener { _, isChecked ->
|
||||
ReadBookConfig.shareLayout = isChecked
|
||||
upView()
|
||||
postEvent(EventBus.UP_CONFIG, arrayListOf(1, 2, 5))
|
||||
|
||||
Reference in New Issue
Block a user