Remove redundant preference composables
This commit is contained in:
@@ -54,9 +54,10 @@ import eu.kanade.presentation.components.DIVIDER_ALPHA
|
||||
import eu.kanade.presentation.components.Divider
|
||||
import eu.kanade.presentation.components.EmptyScreen
|
||||
import eu.kanade.presentation.components.LoadingScreen
|
||||
import eu.kanade.presentation.components.PreferenceRow
|
||||
import eu.kanade.presentation.components.Scaffold
|
||||
import eu.kanade.presentation.components.ScrollbarLazyColumn
|
||||
import eu.kanade.presentation.more.settings.widget.TextPreferenceWidget
|
||||
import eu.kanade.presentation.more.settings.widget.TrailingWidgetBuffer
|
||||
import eu.kanade.presentation.util.horizontalPadding
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.extension.model.Extension
|
||||
@@ -376,15 +377,14 @@ private fun SourceSwitchPreference(
|
||||
) {
|
||||
val context = LocalContext.current
|
||||
|
||||
PreferenceRow(
|
||||
TextPreferenceWidget(
|
||||
modifier = modifier,
|
||||
title = if (source.labelAsName) {
|
||||
source.source.toString()
|
||||
} else {
|
||||
LocaleHelper.getSourceDisplayName(source.source.lang, context)
|
||||
},
|
||||
onClick = { onClickSource(source.source.id) },
|
||||
action = {
|
||||
widget = {
|
||||
Row(
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
@@ -398,9 +398,14 @@ private fun SourceSwitchPreference(
|
||||
}
|
||||
}
|
||||
|
||||
Switch(checked = source.enabled, onCheckedChange = null)
|
||||
Switch(
|
||||
checked = source.enabled,
|
||||
onCheckedChange = null,
|
||||
modifier = Modifier.padding(start = TrailingWidgetBuffer),
|
||||
)
|
||||
}
|
||||
},
|
||||
onPreferenceClick = { onClickSource(source.source.id) },
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user