mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-13 04:28:55 +01:00
Move isLocal extension functions to LocalSource
This commit is contained in:
@@ -35,7 +35,7 @@ import tachiyomi.presentation.core.screens.EmptyScreen
|
||||
import tachiyomi.presentation.core.screens.LoadingScreen
|
||||
import tachiyomi.presentation.core.theme.header
|
||||
import tachiyomi.presentation.core.util.plus
|
||||
import tachiyomi.source.local.LocalSource
|
||||
import tachiyomi.source.local.isLocal
|
||||
|
||||
@Composable
|
||||
fun SourcesScreen(
|
||||
@@ -175,7 +175,7 @@ fun SourceOptionsDialog(
|
||||
.fillMaxWidth()
|
||||
.padding(vertical = 16.dp),
|
||||
)
|
||||
if (source.id != LocalSource.ID) {
|
||||
if (source.isLocal()) {
|
||||
Text(
|
||||
text = stringResource(R.string.action_disable),
|
||||
modifier = Modifier
|
||||
|
||||
@@ -33,7 +33,7 @@ import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.extension.model.Extension
|
||||
import tachiyomi.core.util.lang.withIOContext
|
||||
import tachiyomi.domain.source.model.Source
|
||||
import tachiyomi.source.local.LocalSource
|
||||
import tachiyomi.source.local.isLocal
|
||||
|
||||
private val defaultModifier = Modifier
|
||||
.height(40.dp)
|
||||
@@ -62,7 +62,7 @@ fun SourceIcon(
|
||||
modifier = modifier.then(defaultModifier),
|
||||
)
|
||||
}
|
||||
source.id == LocalSource.ID -> {
|
||||
source.isLocal() -> {
|
||||
Image(
|
||||
painter = painterResource(R.mipmap.ic_local_source),
|
||||
contentDescription = null,
|
||||
|
||||
Reference in New Issue
Block a user