diff --git a/domain/src/commonMain/kotlin/ca/gosyer/jui/domain/reader/model/NavigationMode.kt b/domain/src/commonMain/kotlin/ca/gosyer/jui/domain/reader/model/NavigationMode.kt
index f5919cc4..3a9f820b 100644
--- a/domain/src/commonMain/kotlin/ca/gosyer/jui/domain/reader/model/NavigationMode.kt
+++ b/domain/src/commonMain/kotlin/ca/gosyer/jui/domain/reader/model/NavigationMode.kt
@@ -15,6 +15,7 @@ import kotlinx.serialization.Transient
@Serializable
@Stable
enum class NavigationMode(@Transient val res: StringResource) {
+ Disabled(MR.strings.disabled),
LNavigation(MR.strings.nav_l_shaped),
KindlishNavigation(MR.strings.nav_kindle_ish),
EdgeNavigation(MR.strings.nav_edge),
diff --git a/i18n/src/commonMain/resources/MR/values/base/strings.xml b/i18n/src/commonMain/resources/MR/values/base/strings.xml
index 734b61f1..2e2ab7b8 100644
--- a/i18n/src/commonMain/resources/MR/values/base/strings.xml
+++ b/i18n/src/commonMain/resources/MR/values/base/strings.xml
@@ -278,6 +278,7 @@
Kindle-ish
Edge
Right and left
+ Disabled
Host server inside Tachidesk-JUI
diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/reader/ReaderMenu.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/reader/ReaderMenu.kt
index 3f9d64b4..db49bea8 100644
--- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/reader/ReaderMenu.kt
+++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/reader/ReaderMenu.kt
@@ -16,6 +16,8 @@ import androidx.compose.animation.slideInVertically
import androidx.compose.animation.slideOutHorizontally
import androidx.compose.animation.slideOutVertically
import androidx.compose.foundation.Image
+import androidx.compose.foundation.clickable
+import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.BoxWithConstraints
import androidx.compose.foundation.layout.Column
@@ -245,7 +247,7 @@ fun WideReaderMenu(
imageScale: ImageScale,
fitSize: Boolean,
maxSize: Int,
- navigationViewer: ViewerNavigation,
+ navigationViewer: ViewerNavigation?,
currentPage: ReaderItem?,
currentPageOffset: Int,
navigate: (Int) -> Unit,
@@ -327,7 +329,7 @@ fun ThinReaderMenu(
imageScale: ImageScale,
fitSize: Boolean,
maxSize: Int,
- navigationViewer: ViewerNavigation,
+ navigationViewer: ViewerNavigation?,
currentPage: ReaderItem?,
currentPageOffset: Int,
navigate: (Int) -> Unit,
@@ -430,7 +432,7 @@ fun ReaderLayout(
imageScale: ImageScale,
fitSize: Boolean,
maxSize: Int,
- navigationViewer: ViewerNavigation,
+ navigationViewer: ViewerNavigation?,
currentPage: ReaderItem?,
currentPageOffset: Int,
navigateTap: (Navigation) -> Unit,
@@ -443,10 +445,20 @@ fun ReaderLayout(
.fillMaxWidth()
.aspectRatio(mangaAspectRatio)
val readerModifier = Modifier
- .navigationClickable(
- navigation = navigationViewer,
- onClick = navigateTap
- )
+ .let {
+ if (navigationViewer != null) {
+ it.navigationClickable(
+ navigation = navigationViewer,
+ onClick = navigateTap
+ )
+ } else {
+ it.clickable(
+ interactionSource = remember { MutableInteractionSource() },
+ indication = null
+ ) { navigateTap(Navigation.MENU) }
+ }
+ }
+
if (continuous) {
ContinuousReader(
@@ -578,6 +590,7 @@ fun ChapterSeparator(
}
fun NavigationMode.toNavigation() = when (this) {
+ NavigationMode.Disabled -> null
NavigationMode.RightAndLeftNavigation -> RightAndLeftNavigation()
NavigationMode.KindlishNavigation -> KindlishNavigation()
NavigationMode.LNavigation -> LNavigation()