Minor cleanup
This commit is contained in:
parent
259b8f383f
commit
70b83e1061
@ -260,7 +260,7 @@ fun LibraryBottomActionMenu(
|
|||||||
// SY -->
|
// SY -->
|
||||||
val showOverflow = onClickCleanTitles != null || onClickAddToMangaDex != null
|
val showOverflow = onClickCleanTitles != null || onClickAddToMangaDex != null
|
||||||
val configuration = LocalConfiguration.current
|
val configuration = LocalConfiguration.current
|
||||||
val moveMarkPrev = onDeleteClicked != null && remember { !configuration.isTabletUi() }
|
val moveMarkPrev = remember { !configuration.isTabletUi() }
|
||||||
var overFlowOpen by remember { mutableStateOf(false) }
|
var overFlowOpen by remember { mutableStateOf(false) }
|
||||||
// SY <--
|
// SY <--
|
||||||
Row(
|
Row(
|
||||||
@ -304,17 +304,15 @@ fun LibraryBottomActionMenu(
|
|||||||
onClick = onDeleteClicked,
|
onClick = onDeleteClicked,
|
||||||
)
|
)
|
||||||
// SY -->
|
// SY -->
|
||||||
if (onMarkAsReadClicked != null) {
|
Button(
|
||||||
Button(
|
title = stringResource(R.string.action_mark_as_read),
|
||||||
title = stringResource(R.string.action_mark_as_read),
|
icon = Icons.Outlined.DoneAll,
|
||||||
icon = Icons.Outlined.DoneAll,
|
toConfirm = confirm[1],
|
||||||
toConfirm = confirm[1],
|
onLongClick = { onLongClickItem(1) },
|
||||||
onLongClick = { onLongClickItem(1) },
|
onClick = onMarkAsReadClicked,
|
||||||
onClick = onMarkAsReadClicked,
|
)
|
||||||
)
|
|
||||||
}
|
|
||||||
if (showOverflow) {
|
if (showOverflow) {
|
||||||
if (!moveMarkPrev && onMarkAsUnreadClicked != null) {
|
if (!moveMarkPrev) {
|
||||||
Button(
|
Button(
|
||||||
title = stringResource(R.string.action_mark_as_unread),
|
title = stringResource(R.string.action_mark_as_unread),
|
||||||
icon = Icons.Outlined.RemoveDone,
|
icon = Icons.Outlined.RemoveDone,
|
||||||
@ -334,7 +332,7 @@ fun LibraryBottomActionMenu(
|
|||||||
expanded = overFlowOpen,
|
expanded = overFlowOpen,
|
||||||
onDismissRequest = { overFlowOpen = false },
|
onDismissRequest = { overFlowOpen = false },
|
||||||
) {
|
) {
|
||||||
if (onMarkAsUnreadClicked != null && moveMarkPrev) {
|
if (moveMarkPrev) {
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
text = { Text(stringResource(R.string.action_mark_as_unread)) },
|
text = { Text(stringResource(R.string.action_mark_as_unread)) },
|
||||||
onClick = onMarkAsUnreadClicked,
|
onClick = onMarkAsUnreadClicked,
|
||||||
@ -360,15 +358,13 @@ fun LibraryBottomActionMenu(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (onMarkAsUnreadClicked != null) {
|
Button(
|
||||||
Button(
|
title = stringResource(R.string.action_mark_as_unread),
|
||||||
title = stringResource(R.string.action_mark_as_unread),
|
icon = Icons.Outlined.RemoveDone,
|
||||||
icon = Icons.Outlined.RemoveDone,
|
toConfirm = confirm[2],
|
||||||
toConfirm = confirm[2],
|
onLongClick = { onLongClickItem(2) },
|
||||||
onLongClick = { onLongClickItem(2) },
|
onClick = onMarkAsUnreadClicked,
|
||||||
onClick = onMarkAsUnreadClicked,
|
)
|
||||||
)
|
|
||||||
}
|
|
||||||
if (onClickMigrate != null) {
|
if (onClickMigrate != null) {
|
||||||
Button(
|
Button(
|
||||||
title = stringResource(R.string.migrate),
|
title = stringResource(R.string.migrate),
|
||||||
|
@ -12,7 +12,6 @@ import androidx.fragment.app.FragmentActivity
|
|||||||
import cafe.adriel.voyager.navigator.LocalNavigator
|
import cafe.adriel.voyager.navigator.LocalNavigator
|
||||||
import cafe.adriel.voyager.navigator.currentOrThrow
|
import cafe.adriel.voyager.navigator.currentOrThrow
|
||||||
import eu.kanade.domain.UnsortedPreferences
|
import eu.kanade.domain.UnsortedPreferences
|
||||||
import eu.kanade.domain.base.BasePreferences
|
|
||||||
import eu.kanade.domain.source.service.SourcePreferences
|
import eu.kanade.domain.source.service.SourcePreferences
|
||||||
import eu.kanade.domain.ui.UiPreferences
|
import eu.kanade.domain.ui.UiPreferences
|
||||||
import eu.kanade.presentation.more.settings.Preference
|
import eu.kanade.presentation.more.settings.Preference
|
||||||
@ -35,7 +34,6 @@ object SettingsBrowseScreen : SearchableSettings {
|
|||||||
override fun getPreferences(): List<Preference> {
|
override fun getPreferences(): List<Preference> {
|
||||||
val context = LocalContext.current
|
val context = LocalContext.current
|
||||||
val sourcePreferences = remember { Injekt.get<SourcePreferences>() }
|
val sourcePreferences = remember { Injekt.get<SourcePreferences>() }
|
||||||
val preferences = remember { Injekt.get<BasePreferences>() }
|
|
||||||
// SY -->
|
// SY -->
|
||||||
val uiPreferences = remember { Injekt.get<UiPreferences>() }
|
val uiPreferences = remember { Injekt.get<UiPreferences>() }
|
||||||
val unsortedPreferences = remember { Injekt.get<UnsortedPreferences>() }
|
val unsortedPreferences = remember { Injekt.get<UnsortedPreferences>() }
|
||||||
|
@ -18,7 +18,7 @@ enum class EHLogLevel(@StringRes val nameRes: Int, @StringRes val description: I
|
|||||||
|
|
||||||
fun init(context: Context) {
|
fun init(context: Context) {
|
||||||
curLogLevel = PreferenceManager.getDefaultSharedPreferences(context)
|
curLogLevel = PreferenceManager.getDefaultSharedPreferences(context)
|
||||||
.getInt("eh_log_level", 0) // todo
|
.getInt("eh_log_level", MINIMAL.ordinal) // todo
|
||||||
}
|
}
|
||||||
|
|
||||||
fun shouldLog(requiredLogLevel: EHLogLevel): Boolean {
|
fun shouldLog(requiredLogLevel: EHLogLevel): Boolean {
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package exh.metadata.sql.models
|
package exh.metadata.sql.models
|
||||||
|
|
||||||
import kotlinx.serialization.Contextual
|
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
@ -19,8 +18,4 @@ data class SearchMetadata(
|
|||||||
|
|
||||||
// The version of this metadata's extra. Used to track changes to the 'extra' field's schema
|
// The version of this metadata's extra. Used to track changes to the 'extra' field's schema
|
||||||
val extraVersion: Int,
|
val extraVersion: Int,
|
||||||
) {
|
)
|
||||||
// Transient information attached to this piece of metadata, useful for caching
|
|
||||||
|
|
||||||
var transientCache: Map<String, @Contextual Any>? = null
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user