mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-18 22:49:16 +01:00
Long press reader settings icon to open color filter tab
Partially addresses #4867
This commit is contained in:
parent
3287ca9cf2
commit
54a23ddd1f
@ -414,6 +414,11 @@ class ReaderActivity : BaseRxActivity<ReaderActivityBinding, ReaderPresenter>()
|
|||||||
setOnClickListener {
|
setOnClickListener {
|
||||||
ReaderSettingsSheet(this@ReaderActivity).show()
|
ReaderSettingsSheet(this@ReaderActivity).show()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setOnLongClickListener {
|
||||||
|
ReaderSettingsSheet(this@ReaderActivity, showColorFilterSettings = true).show()
|
||||||
|
true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,7 +8,10 @@ import eu.kanade.tachiyomi.ui.reader.ReaderActivity
|
|||||||
import eu.kanade.tachiyomi.widget.SimpleTabSelectedListener
|
import eu.kanade.tachiyomi.widget.SimpleTabSelectedListener
|
||||||
import eu.kanade.tachiyomi.widget.sheet.TabbedBottomSheetDialog
|
import eu.kanade.tachiyomi.widget.sheet.TabbedBottomSheetDialog
|
||||||
|
|
||||||
class ReaderSettingsSheet(private val activity: ReaderActivity) : TabbedBottomSheetDialog(activity) {
|
class ReaderSettingsSheet(
|
||||||
|
private val activity: ReaderActivity,
|
||||||
|
showColorFilterSettings: Boolean = false,
|
||||||
|
) : TabbedBottomSheetDialog(activity) {
|
||||||
|
|
||||||
private val readingModeSettings = ReaderReadingModeSettings(activity)
|
private val readingModeSettings = ReaderReadingModeSettings(activity)
|
||||||
private val generalSettings = ReaderGeneralSettings(activity)
|
private val generalSettings = ReaderGeneralSettings(activity)
|
||||||
@ -40,6 +43,10 @@ class ReaderSettingsSheet(private val activity: ReaderActivity) : TabbedBottomSh
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (showColorFilterSettings) {
|
||||||
|
binding.tabs.getTabAt(filterTabIndex)?.select()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getTabViews() = listOf(
|
override fun getTabViews() = listOf(
|
||||||
|
@ -8,7 +8,7 @@ import eu.kanade.tachiyomi.widget.ViewPagerAdapter
|
|||||||
|
|
||||||
abstract class TabbedBottomSheetDialog(private val activity: Activity) : BaseBottomSheetDialog(activity) {
|
abstract class TabbedBottomSheetDialog(private val activity: Activity) : BaseBottomSheetDialog(activity) {
|
||||||
|
|
||||||
val binding: CommonTabbedSheetBinding = CommonTabbedSheetBinding.inflate(activity.layoutInflater)
|
val binding = CommonTabbedSheetBinding.inflate(activity.layoutInflater)
|
||||||
|
|
||||||
init {
|
init {
|
||||||
val adapter = LibrarySettingsSheetAdapter()
|
val adapter = LibrarySettingsSheetAdapter()
|
||||||
|
Loading…
Reference in New Issue
Block a user