|
|
@ -16,9 +16,13 @@ import io.legado.app.base.BaseDialogFragment |
|
|
|
import io.legado.app.constant.PreferKey |
|
|
|
import io.legado.app.constant.PreferKey |
|
|
|
import io.legado.app.data.entities.Book |
|
|
|
import io.legado.app.data.entities.Book |
|
|
|
import io.legado.app.data.entities.SearchBook |
|
|
|
import io.legado.app.data.entities.SearchBook |
|
|
|
|
|
|
|
import io.legado.app.help.AppConfig |
|
|
|
import io.legado.app.lib.theme.primaryColor |
|
|
|
import io.legado.app.lib.theme.primaryColor |
|
|
|
import io.legado.app.ui.widget.recycler.VerticalDivider |
|
|
|
import io.legado.app.ui.widget.recycler.VerticalDivider |
|
|
|
import io.legado.app.utils.* |
|
|
|
import io.legado.app.utils.applyTint |
|
|
|
|
|
|
|
import io.legado.app.utils.getSize |
|
|
|
|
|
|
|
import io.legado.app.utils.getViewModel |
|
|
|
|
|
|
|
import io.legado.app.utils.putPrefBoolean |
|
|
|
import kotlinx.android.synthetic.main.dialog_change_source.* |
|
|
|
import kotlinx.android.synthetic.main.dialog_change_source.* |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -81,10 +85,8 @@ class ChangeSourceDialog : BaseDialogFragment(), |
|
|
|
tool_bar.inflateMenu(R.menu.change_source) |
|
|
|
tool_bar.inflateMenu(R.menu.change_source) |
|
|
|
tool_bar.menu.applyTint(requireContext()) |
|
|
|
tool_bar.menu.applyTint(requireContext()) |
|
|
|
tool_bar.setOnMenuItemClickListener(this) |
|
|
|
tool_bar.setOnMenuItemClickListener(this) |
|
|
|
tool_bar.menu.findItem(R.id.menu_load_toc)?.isChecked = |
|
|
|
tool_bar.menu.findItem(R.id.menu_load_info)?.isChecked = AppConfig.changeSourceLoadInfo |
|
|
|
getPrefBoolean(PreferKey.changeSourceLoadToc) |
|
|
|
tool_bar.menu.findItem(R.id.menu_load_toc)?.isChecked = AppConfig.changeSourceLoadToc |
|
|
|
tool_bar.menu.findItem(R.id.menu_load_info)?.isChecked = |
|
|
|
|
|
|
|
getPrefBoolean(PreferKey.changeSourceLoadInfo) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private fun initRecyclerView() { |
|
|
|
private fun initRecyclerView() { |
|
|
|