Skip to content

Commit

Permalink
fix: toolbar elevation
Browse files Browse the repository at this point in the history
  • Loading branch information
JunkFood02 committed Nov 22, 2024
1 parent 3ba1eed commit 368ed14
Showing 1 changed file with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import me.ash.reader.infrastructure.preference.LocalReadingPageTonalElevation
import me.ash.reader.infrastructure.preference.LocalReadingRenderer
import me.ash.reader.infrastructure.preference.LocalReadingTheme
import me.ash.reader.infrastructure.preference.ReadingFontsPreference
import me.ash.reader.infrastructure.preference.ReadingPageTonalElevationPreference
import me.ash.reader.infrastructure.preference.ReadingRendererPreference
import me.ash.reader.infrastructure.preference.ReadingThemePreference
import me.ash.reader.infrastructure.preference.not
Expand Down Expand Up @@ -85,12 +86,17 @@ fun ReadingStylePage(
var rendererDialogVisible by remember { mutableStateOf(false) }
var fontsDialogVisible by remember { mutableStateOf(false) }

val launcher = rememberLauncherForActivityResult(ActivityResultContracts.OpenDocument()) { uri ->
uri?.let {
ExternalFonts(context, it, ExternalFonts.FontType.ReadingFont).copyToInternalStorage()
ReadingFontsPreference.External.put(context, scope)
} ?: context.showToast("Cannot get activity result with launcher")
}
val launcher =
rememberLauncherForActivityResult(ActivityResultContracts.OpenDocument()) { uri ->
uri?.let {
ExternalFonts(
context,
it,
ExternalFonts.FontType.ReadingFont
).copyToInternalStorage()
ReadingFontsPreference.External.put(context, scope)
} ?: context.showToast("Cannot get activity result with launcher")
}

RYScaffold(
containerColor = MaterialTheme.colorScheme.surface onLight MaterialTheme.colorScheme.inverseOnSurface,
Expand All @@ -111,7 +117,8 @@ fun ReadingStylePage(

// Preview
item {
Row(modifier = Modifier.horizontalScroll(rememberScrollState())
Row(
modifier = Modifier.horizontalScroll(rememberScrollState())
) {
Spacer(modifier = Modifier.width(24.dp))
ReadingThemePreference.values.map {
Expand Down

0 comments on commit 368ed14

Please sign in to comment.