Merge pull request #885 from ranzou06/devel

This commit is contained in:
Koitharu
2024-05-20 18:51:21 +03:00
committed by GitHub
3 changed files with 36 additions and 0 deletions

View File

@@ -100,6 +100,12 @@
<intent-filter>
<action android:name="${applicationId}.action.READ_MANGA" />
</intent-filter>
<intent-filter>
<action android:name="com.samsung.android.support.REMOTE_ACTION" />
</intent-filter>
<meta-data
android:name="com.samsung.android.support.REMOTE_ACTION"
android:resource="@xml/remote_action"/>
</activity>
<activity
android:name="org.koitharu.kotatsu.search.ui.SearchActivity"

View File

@@ -36,6 +36,17 @@ class ReaderControlDelegate(
}
fun onKeyDown(keyCode: Int): Boolean = when (keyCode) {
KeyEvent.KEYCODE_R -> {
listener.switchPageBy(1)
true
}
KeyEvent.KEYCODE_L -> {
listener.switchPageBy(-1)
true
}
KeyEvent.KEYCODE_VOLUME_UP -> if (settings.isReaderVolumeButtonsEnabled) {
listener.switchPageBy(-1)
true

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<remote-actions version="1.2">
<action
id="next_filter"
label="@string/prev_page"
priority="1"
trigger_key="L">
<preference name="gesture" value="swipe_left"/>
</action>
<action
id="prev_filter"
label="@string/next_page"
priority="2"
trigger_key="R">
<preference name="gesture" value="swipe_right"/>
</action>
</remote-actions>