mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-21 20:47:03 -05:00
Minor cleanup
This commit is contained in:
parent
447bcb28ef
commit
82a9d36df7
6 changed files with 12 additions and 25 deletions
5
.github/renovate.json5
vendored
5
.github/renovate.json5
vendored
|
@ -5,11 +5,6 @@
|
||||||
],
|
],
|
||||||
"schedule": ["every sunday"],
|
"schedule": ["every sunday"],
|
||||||
"packageRules": [
|
"packageRules": [
|
||||||
{
|
|
||||||
"managers": ["maven"],
|
|
||||||
"packageNames": ["com.google.guava:guava"],
|
|
||||||
"versionScheme": "docker"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
// Compiler plugins are tightly coupled to Kotlin version
|
// Compiler plugins are tightly coupled to Kotlin version
|
||||||
"groupName": "Kotlin",
|
"groupName": "Kotlin",
|
||||||
|
|
1
app/.gitignore
vendored
1
app/.gitignore
vendored
|
@ -1,4 +1,3 @@
|
||||||
/build
|
/build
|
||||||
*iml
|
*iml
|
||||||
*.iml
|
*.iml
|
||||||
custom.gradle
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
|
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
<shortcut
|
<shortcut
|
||||||
android:enabled="true"
|
android:enabled="true"
|
||||||
android:icon="@drawable/sc_collections_bookmark_48dp"
|
android:icon="@drawable/sc_collections_bookmark_48dp"
|
||||||
|
|
|
@ -106,11 +106,11 @@ fun HistoryDeleteAllDialog(
|
||||||
|
|
||||||
@ThemePreviews
|
@ThemePreviews
|
||||||
@Composable
|
@Composable
|
||||||
internal fun HistoryDeleteDialogPreview() {
|
private fun HistoryDeleteDialogPreview() {
|
||||||
TachiyomiTheme {
|
TachiyomiTheme {
|
||||||
HistoryDeleteDialog(
|
HistoryDeleteDialog(
|
||||||
onDismissRequest = {},
|
onDismissRequest = {},
|
||||||
onDelete = { _ -> run {} },
|
onDelete = {},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ import tachiyomi.domain.history.model.HistoryWithRelations
|
||||||
import tachiyomi.presentation.core.components.material.padding
|
import tachiyomi.presentation.core.components.material.padding
|
||||||
import tachiyomi.presentation.core.util.ThemePreviews
|
import tachiyomi.presentation.core.util.ThemePreviews
|
||||||
|
|
||||||
private val HISTORY_ITEM_HEIGHT = 96.dp
|
private val HistoryItemHeight = 96.dp
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun HistoryItem(
|
fun HistoryItem(
|
||||||
|
@ -43,7 +43,7 @@ fun HistoryItem(
|
||||||
Row(
|
Row(
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
.clickable(onClick = onClickResume)
|
.clickable(onClick = onClickResume)
|
||||||
.height(HISTORY_ITEM_HEIGHT)
|
.height(HistoryItemHeight)
|
||||||
.padding(horizontal = MaterialTheme.padding.medium, vertical = MaterialTheme.padding.small),
|
.padding(horizontal = MaterialTheme.padding.medium, vertical = MaterialTheme.padding.small),
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
) {
|
) {
|
||||||
|
@ -93,7 +93,7 @@ fun HistoryItem(
|
||||||
|
|
||||||
@ThemePreviews
|
@ThemePreviews
|
||||||
@Composable
|
@Composable
|
||||||
internal fun HistoryItemPreviews(
|
private fun HistoryItemPreviews(
|
||||||
@PreviewParameter(HistoryWithRelationsProvider::class)
|
@PreviewParameter(HistoryWithRelationsProvider::class)
|
||||||
historyWithRelations: HistoryWithRelations,
|
historyWithRelations: HistoryWithRelations,
|
||||||
) {
|
) {
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package eu.kanade.tachiyomi.ui.reader
|
package eu.kanade.tachiyomi.ui.reader
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.annotation.TargetApi
|
|
||||||
import android.app.assist.AssistContent
|
import android.app.assist.AssistContent
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
|
@ -362,15 +361,11 @@ class ReaderActivity : BaseActivity() {
|
||||||
},
|
},
|
||||||
|
|
||||||
readingMode = ReadingModeType.fromPreference(
|
readingMode = ReadingModeType.fromPreference(
|
||||||
viewModel.getMangaReadingMode(
|
viewModel.getMangaReadingMode(resolveDefault = false),
|
||||||
resolveDefault = false,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
onClickReadingMode = viewModel::openReadingModeSelectDialog,
|
onClickReadingMode = viewModel::openReadingModeSelectDialog,
|
||||||
orientationMode = OrientationType.fromPreference(
|
orientationMode = OrientationType.fromPreference(
|
||||||
viewModel.getMangaOrientationType(
|
viewModel.getMangaOrientationType(resolveDefault = false),
|
||||||
resolveDefault = false,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
onClickOrientationMode = viewModel::openOrientationModeSelectDialog,
|
onClickOrientationMode = viewModel::openOrientationModeSelectDialog,
|
||||||
cropEnabled = cropEnabled,
|
cropEnabled = cropEnabled,
|
||||||
|
@ -786,11 +781,9 @@ class ReaderActivity : BaseActivity() {
|
||||||
.onEach(::setTrueColor)
|
.onEach(::setTrueColor)
|
||||||
.launchIn(lifecycleScope)
|
.launchIn(lifecycleScope)
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
|
||||||
readerPreferences.cutoutShort().changes()
|
readerPreferences.cutoutShort().changes()
|
||||||
.onEach(::setCutoutShort)
|
.onEach(::setCutoutShort)
|
||||||
.launchIn(lifecycleScope)
|
.launchIn(lifecycleScope)
|
||||||
}
|
|
||||||
|
|
||||||
readerPreferences.keepScreenOn().changes()
|
readerPreferences.keepScreenOn().changes()
|
||||||
.onEach(::setKeepScreenOn)
|
.onEach(::setKeepScreenOn)
|
||||||
|
@ -842,8 +835,9 @@ class ReaderActivity : BaseActivity() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@TargetApi(Build.VERSION_CODES.P)
|
|
||||||
private fun setCutoutShort(enabled: Boolean) {
|
private fun setCutoutShort(enabled: Boolean) {
|
||||||
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) return
|
||||||
|
|
||||||
window.attributes.layoutInDisplayCutoutMode = when (enabled) {
|
window.attributes.layoutInDisplayCutoutMode = when (enabled) {
|
||||||
true -> WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES
|
true -> WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES
|
||||||
false -> WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER
|
false -> WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER
|
||||||
|
|
Loading…
Reference in a new issue