Some linting
This commit is contained in:
parent
9ab01ec20c
commit
19746904e1
@ -15,7 +15,7 @@ import tachiyomi.source.local.isLocal
|
|||||||
*/
|
*/
|
||||||
fun List<Chapter>.applyFilters(
|
fun List<Chapter>.applyFilters(
|
||||||
manga: Manga,
|
manga: Manga,
|
||||||
downloadManager: DownloadManager,/* SY --> */
|
downloadManager: DownloadManager, /* SY --> */
|
||||||
mergedManga: Map<Long, Manga>, /* SY <-- */
|
mergedManga: Map<Long, Manga>, /* SY <-- */
|
||||||
): List<Chapter> {
|
): List<Chapter> {
|
||||||
val isLocalManga = manga.isLocal()
|
val isLocalManga = manga.isLocal()
|
||||||
|
|||||||
@ -32,7 +32,11 @@ class GetEnabledSources(
|
|||||||
) { a, b, c -> Triple(a, b, c) },
|
) { a, b, c -> Triple(a, b, c) },
|
||||||
// SY <--
|
// SY <--
|
||||||
repository.getSources(),
|
repository.getSources(),
|
||||||
) { pinnedSourceIds, (enabledLanguages, disabledSources, lastUsedSource), (excludedFromDataSaver, sourcesInCategories, sourceCategoriesFilter), sources ->
|
) { pinnedSourceIds,
|
||||||
|
(enabledLanguages, disabledSources, lastUsedSource),
|
||||||
|
(excludedFromDataSaver, sourcesInCategories, sourceCategoriesFilter),
|
||||||
|
sources ->
|
||||||
|
|
||||||
val sourcesAndCategories = sourcesInCategories.map {
|
val sourcesAndCategories = sourcesInCategories.map {
|
||||||
it.split('|').let { (source, test) -> source.toLong() to test }
|
it.split('|').let { (source, test) -> source.toLong() to test }
|
||||||
}
|
}
|
||||||
@ -61,7 +65,11 @@ class GetEnabledSources(
|
|||||||
categories.forEach { category ->
|
categories.forEach { category ->
|
||||||
toFlatten.add(source.copy(category = category, pin = source.pin - Pin.Actual))
|
toFlatten.add(source.copy(category = category, pin = source.pin - Pin.Actual))
|
||||||
}
|
}
|
||||||
if (sourceCategoriesFilter && Pin.Actual !in toFlatten[0].pin && source.id in sourcesInSourceCategories) {
|
if (
|
||||||
|
sourceCategoriesFilter &&
|
||||||
|
Pin.Actual !in toFlatten[0].pin &&
|
||||||
|
source.id in sourcesInSourceCategories
|
||||||
|
) {
|
||||||
toFlatten.removeAt(0)
|
toFlatten.removeAt(0)
|
||||||
}
|
}
|
||||||
// SY <--
|
// SY <--
|
||||||
|
|||||||
@ -30,7 +30,12 @@ class TrackChapter(
|
|||||||
|
|
||||||
tracks.mapNotNull { track ->
|
tracks.mapNotNull { track ->
|
||||||
val service = trackerManager.get(track.syncId)
|
val service = trackerManager.get(track.syncId)
|
||||||
if (service == null || !service.isLoggedIn || chapterNumber <= track.lastChapterRead /* SY --> */ || (service is MdList && track.status == FollowStatus.UNFOLLOWED.int.toLong())/* SY <-- */) {
|
if (
|
||||||
|
service == null ||
|
||||||
|
!service.isLoggedIn ||
|
||||||
|
chapterNumber <= track.lastChapterRead /* SY --> */ ||
|
||||||
|
(service is MdList && track.status == FollowStatus.UNFOLLOWED.int.toLong())/* SY <-- */
|
||||||
|
) {
|
||||||
return@mapNotNull null
|
return@mapNotNull null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -74,7 +74,8 @@ internal fun GlobalSearchContent(
|
|||||||
items.forEach { (source, result) ->
|
items.forEach { (source, result) ->
|
||||||
item(key = source.id) {
|
item(key = source.id) {
|
||||||
GlobalSearchResultItem(
|
GlobalSearchResultItem(
|
||||||
title = fromSourceId?.let { "▶ ${source.name}".takeIf { source.id == fromSourceId } } ?: source.name,
|
title = fromSourceId?.let { "▶ ${source.name}".takeIf { source.id == fromSourceId } }
|
||||||
|
?: source.name,
|
||||||
subtitle = LocaleHelper.getDisplayName(source.lang),
|
subtitle = LocaleHelper.getDisplayName(source.lang),
|
||||||
onClick = { onClickSource(source) },
|
onClick = { onClickSource(source) },
|
||||||
) {
|
) {
|
||||||
|
|||||||
@ -110,7 +110,12 @@ fun BrowseSourceEHentaiListItem(
|
|||||||
)
|
)
|
||||||
val pageCount = metadata.length
|
val pageCount = metadata.length
|
||||||
if (locale != null && pageCount != null) {
|
if (locale != null && pageCount != null) {
|
||||||
resources.getQuantityString(R.plurals.browse_language_and_pages, pageCount, pageCount, locale.toLanguageTag().uppercase())
|
resources.getQuantityString(
|
||||||
|
R.plurals.browse_language_and_pages,
|
||||||
|
pageCount,
|
||||||
|
pageCount,
|
||||||
|
locale.toLanguageTag().uppercase()
|
||||||
|
)
|
||||||
} else if (pageCount != null) {
|
} else if (pageCount != null) {
|
||||||
resources.getQuantityString(R.plurals.num_pages, pageCount, pageCount)
|
resources.getQuantityString(R.plurals.num_pages, pageCount, pageCount)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -59,7 +59,11 @@ fun BrowseSourceToolbar(
|
|||||||
actions = listOfNotNull(
|
actions = listOfNotNull(
|
||||||
AppBar.Action(
|
AppBar.Action(
|
||||||
title = stringResource(R.string.action_display_mode),
|
title = stringResource(R.string.action_display_mode),
|
||||||
icon = if (displayMode == LibraryDisplayMode.List) Icons.Filled.ViewList else Icons.Filled.ViewModule,
|
icon = if (displayMode == LibraryDisplayMode.List) {
|
||||||
|
Icons.Filled.ViewList
|
||||||
|
} else {
|
||||||
|
Icons.Filled.ViewModule
|
||||||
|
},
|
||||||
onClick = { selectingDisplayMode = true },
|
onClick = { selectingDisplayMode = true },
|
||||||
).takeIf { displayMode != null },
|
).takeIf { displayMode != null },
|
||||||
if (isLocalSource) {
|
if (isLocalSource) {
|
||||||
|
|||||||
@ -53,7 +53,8 @@ fun BiometricTimesScreen(
|
|||||||
BiometricTimesContent(
|
BiometricTimesContent(
|
||||||
timeRanges = state.timeRanges,
|
timeRanges = state.timeRanges,
|
||||||
lazyListState = lazyListState,
|
lazyListState = lazyListState,
|
||||||
paddingValues = paddingValues + topSmallPaddingValues + PaddingValues(horizontal = MaterialTheme.padding.medium),
|
paddingValues = paddingValues + topSmallPaddingValues +
|
||||||
|
PaddingValues(horizontal = MaterialTheme.padding.medium),
|
||||||
onClickDelete = onClickDelete,
|
onClickDelete = onClickDelete,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -75,7 +75,8 @@ fun CategoryScreen(
|
|||||||
CategoryContent(
|
CategoryContent(
|
||||||
categories = state.categories,
|
categories = state.categories,
|
||||||
lazyListState = lazyListState,
|
lazyListState = lazyListState,
|
||||||
paddingValues = paddingValues + topSmallPaddingValues + PaddingValues(horizontal = MaterialTheme.padding.medium),
|
paddingValues = paddingValues + topSmallPaddingValues +
|
||||||
|
PaddingValues(horizontal = MaterialTheme.padding.medium),
|
||||||
onClickRename = onClickRename,
|
onClickRename = onClickRename,
|
||||||
onClickDelete = onClickDelete,
|
onClickDelete = onClickDelete,
|
||||||
onMoveUp = onClickMoveUp,
|
onMoveUp = onClickMoveUp,
|
||||||
|
|||||||
@ -54,7 +54,8 @@ fun SortTagScreen(
|
|||||||
SortTagContent(
|
SortTagContent(
|
||||||
tags = state.tags,
|
tags = state.tags,
|
||||||
lazyListState = lazyListState,
|
lazyListState = lazyListState,
|
||||||
paddingValues = paddingValues + topSmallPaddingValues + PaddingValues(horizontal = MaterialTheme.padding.medium),
|
paddingValues = paddingValues + topSmallPaddingValues +
|
||||||
|
PaddingValues(horizontal = MaterialTheme.padding.medium),
|
||||||
onClickDelete = onClickDelete,
|
onClickDelete = onClickDelete,
|
||||||
onMoveUp = onClickMoveUp,
|
onMoveUp = onClickMoveUp,
|
||||||
onMoveDown = onClickMoveDown,
|
onMoveDown = onClickMoveDown,
|
||||||
|
|||||||
@ -53,7 +53,8 @@ fun SourceCategoryScreen(
|
|||||||
SourceCategoryContent(
|
SourceCategoryContent(
|
||||||
categories = state.categories,
|
categories = state.categories,
|
||||||
lazyListState = lazyListState,
|
lazyListState = lazyListState,
|
||||||
paddingValues = paddingValues + topSmallPaddingValues + PaddingValues(horizontal = MaterialTheme.padding.medium),
|
paddingValues = paddingValues + topSmallPaddingValues +
|
||||||
|
PaddingValues(horizontal = MaterialTheme.padding.medium),
|
||||||
onClickRename = onClickRename,
|
onClickRename = onClickRename,
|
||||||
onClickDelete = onClickDelete,
|
onClickDelete = onClickDelete,
|
||||||
)
|
)
|
||||||
|
|||||||
@ -52,7 +52,8 @@ fun SourceRepoScreen(
|
|||||||
SourceRepoContent(
|
SourceRepoContent(
|
||||||
repos = state.repos,
|
repos = state.repos,
|
||||||
lazyListState = lazyListState,
|
lazyListState = lazyListState,
|
||||||
paddingValues = paddingValues + topSmallPaddingValues + PaddingValues(horizontal = MaterialTheme.padding.medium),
|
paddingValues = paddingValues + topSmallPaddingValues +
|
||||||
|
PaddingValues(horizontal = MaterialTheme.padding.medium),
|
||||||
onClickDelete = onClickDelete,
|
onClickDelete = onClickDelete,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -88,7 +88,11 @@ fun CategoryCreateDialog(
|
|||||||
Text(text = stringResource(R.string.name))
|
Text(text = stringResource(R.string.name))
|
||||||
},
|
},
|
||||||
supportingText = {
|
supportingText = {
|
||||||
val msgRes = if (name.isNotEmpty() && nameAlreadyExists) alreadyExistsError else R.string.information_required_plain
|
val msgRes = if (name.isNotEmpty() && nameAlreadyExists) {
|
||||||
|
alreadyExistsError
|
||||||
|
} else {
|
||||||
|
R.string.information_required_plain
|
||||||
|
}
|
||||||
Text(text = stringResource(msgRes))
|
Text(text = stringResource(msgRes))
|
||||||
},
|
},
|
||||||
isError = name.isNotEmpty() && nameAlreadyExists,
|
isError = name.isNotEmpty() && nameAlreadyExists,
|
||||||
@ -153,7 +157,11 @@ fun CategoryRenameDialog(
|
|||||||
},
|
},
|
||||||
label = { Text(text = stringResource(R.string.name)) },
|
label = { Text(text = stringResource(R.string.name)) },
|
||||||
supportingText = {
|
supportingText = {
|
||||||
val msgRes = if (valueHasChanged && nameAlreadyExists) alreadyExistsError else R.string.information_required_plain
|
val msgRes = if (valueHasChanged && nameAlreadyExists) {
|
||||||
|
alreadyExistsError
|
||||||
|
} else {
|
||||||
|
R.string.information_required_plain
|
||||||
|
}
|
||||||
Text(text = stringResource(msgRes))
|
Text(text = stringResource(msgRes))
|
||||||
},
|
},
|
||||||
isError = valueHasChanged && nameAlreadyExists,
|
isError = valueHasChanged && nameAlreadyExists,
|
||||||
@ -279,8 +287,12 @@ fun ChangeCategoryDialog(
|
|||||||
onClick = {
|
onClick = {
|
||||||
onDismissRequest()
|
onDismissRequest()
|
||||||
onConfirm(
|
onConfirm(
|
||||||
selection.filter { it is CheckboxState.State.Checked || it is CheckboxState.TriState.Include }.map { it.value.id },
|
selection.filter {
|
||||||
selection.filter { it is CheckboxState.State.None || it is CheckboxState.TriState.None }.map { it.value.id },
|
it is CheckboxState.State.Checked || it is CheckboxState.TriState.Include
|
||||||
|
}.map { it.value.id },
|
||||||
|
selection.filter {
|
||||||
|
it is CheckboxState.State.None || it is CheckboxState.TriState.None
|
||||||
|
}.map { it.value.id },
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
) {
|
) {
|
||||||
|
|||||||
@ -30,7 +30,11 @@ fun BiometricTimesListItem(
|
|||||||
Row(
|
Row(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.padding(start = MaterialTheme.padding.medium, top = MaterialTheme.padding.medium, end = MaterialTheme.padding.medium),
|
.padding(
|
||||||
|
start = MaterialTheme.padding.medium,
|
||||||
|
top = MaterialTheme.padding.medium,
|
||||||
|
end = MaterialTheme.padding.medium
|
||||||
|
),
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
) {
|
) {
|
||||||
Icon(imageVector = Icons.Outlined.Label, contentDescription = "")
|
Icon(imageVector = Icons.Outlined.Label, contentDescription = "")
|
||||||
|
|||||||
@ -35,7 +35,11 @@ fun SortTagListItem(
|
|||||||
Row(
|
Row(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.padding(start = MaterialTheme.padding.medium, top = MaterialTheme.padding.medium, end = MaterialTheme.padding.medium),
|
.padding(
|
||||||
|
start = MaterialTheme.padding.medium,
|
||||||
|
top = MaterialTheme.padding.medium,
|
||||||
|
end = MaterialTheme.padding.medium
|
||||||
|
),
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
) {
|
) {
|
||||||
Icon(imageVector = Icons.Outlined.Label, contentDescription = "")
|
Icon(imageVector = Icons.Outlined.Label, contentDescription = "")
|
||||||
|
|||||||
@ -29,7 +29,11 @@ fun SourceRepoListItem(
|
|||||||
Row(
|
Row(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.padding(start = MaterialTheme.padding.medium, top = MaterialTheme.padding.medium, end = MaterialTheme.padding.medium),
|
.padding(
|
||||||
|
start = MaterialTheme.padding.medium,
|
||||||
|
top = MaterialTheme.padding.medium,
|
||||||
|
end = MaterialTheme.padding.medium
|
||||||
|
),
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
) {
|
) {
|
||||||
Icon(imageVector = Icons.Outlined.Label, contentDescription = "")
|
Icon(imageVector = Icons.Outlined.Label, contentDescription = "")
|
||||||
|
|||||||
@ -33,7 +33,11 @@ fun SourceCategoryListItem(
|
|||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.clickable { onRename() }
|
.clickable { onRename() }
|
||||||
.padding(start = MaterialTheme.padding.medium, top = MaterialTheme.padding.medium, end = MaterialTheme.padding.medium),
|
.padding(
|
||||||
|
start = MaterialTheme.padding.medium,
|
||||||
|
top = MaterialTheme.padding.medium,
|
||||||
|
end = MaterialTheme.padding.medium
|
||||||
|
),
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
) {
|
) {
|
||||||
Icon(imageVector = Icons.Outlined.Label, contentDescription = "")
|
Icon(imageVector = Icons.Outlined.Label, contentDescription = "")
|
||||||
|
|||||||
@ -370,7 +370,11 @@ fun SearchToolbar(
|
|||||||
@Composable
|
@Composable
|
||||||
fun UpIcon(navigationIcon: ImageVector? = null) {
|
fun UpIcon(navigationIcon: ImageVector? = null) {
|
||||||
val icon = navigationIcon
|
val icon = navigationIcon
|
||||||
?: if (LocalLayoutDirection.current == LayoutDirection.Ltr) Icons.Outlined.ArrowBack else Icons.Outlined.ArrowForward
|
?: if (LocalLayoutDirection.current == LayoutDirection.Ltr) {
|
||||||
|
Icons.Outlined.ArrowBack
|
||||||
|
} else {
|
||||||
|
Icons.Outlined.ArrowForward
|
||||||
|
}
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = icon,
|
imageVector = icon,
|
||||||
contentDescription = stringResource(R.string.abc_action_bar_up_description),
|
contentDescription = stringResource(R.string.abc_action_bar_up_description),
|
||||||
|
|||||||
@ -41,7 +41,8 @@ fun AroundLayout(
|
|||||||
}
|
}
|
||||||
}.fastMap { it.measure(looseConstraints.copy(maxWidth = bodyContentWidth)) }
|
}.fastMap { it.measure(looseConstraints.copy(maxWidth = bodyContentWidth)) }
|
||||||
|
|
||||||
val height = (startLayoutPlaceables + endLayoutPlaceables + bodyContentPlaceables).maxOfOrNull { it.height } ?: 0
|
val height = (startLayoutPlaceables + endLayoutPlaceables + bodyContentPlaceables)
|
||||||
|
.maxOfOrNull { it.height } ?: 0
|
||||||
|
|
||||||
layout(constraints.maxWidth, height) {
|
layout(constraints.maxWidth, height) {
|
||||||
// Placing to control drawing order to match default elevation of each placeable
|
// Placing to control drawing order to match default elevation of each placeable
|
||||||
|
|||||||
@ -215,7 +215,11 @@ private fun ColumnScope.SortPage(
|
|||||||
onClick = {
|
onClick = {
|
||||||
val isTogglingDirection = sortingMode == mode
|
val isTogglingDirection = sortingMode == mode
|
||||||
val direction = when {
|
val direction = when {
|
||||||
isTogglingDirection -> if (sortDescending) LibrarySort.Direction.Ascending else LibrarySort.Direction.Descending
|
isTogglingDirection -> if (sortDescending) {
|
||||||
|
LibrarySort.Direction.Ascending
|
||||||
|
} else {
|
||||||
|
LibrarySort.Direction.Descending
|
||||||
|
}
|
||||||
else -> if (sortDescending) LibrarySort.Direction.Descending else LibrarySort.Direction.Ascending
|
else -> if (sortDescending) LibrarySort.Direction.Descending else LibrarySort.Direction.Ascending
|
||||||
}
|
}
|
||||||
screenModel.setSort(category, mode, direction)
|
screenModel.setSort(category, mode, direction)
|
||||||
|
|||||||
@ -23,7 +23,10 @@ fun SyncFavoritesWarningDialog(
|
|||||||
) {
|
) {
|
||||||
val context = LocalContext.current
|
val context = LocalContext.current
|
||||||
val text = remember {
|
val text = remember {
|
||||||
HtmlCompat.fromHtml(context.getString(R.string.favorites_sync_notes_message), HtmlCompat.FROM_HTML_MODE_LEGACY).toAnnotatedString()
|
HtmlCompat.fromHtml(
|
||||||
|
context.getString(R.string.favorites_sync_notes_message),
|
||||||
|
HtmlCompat.FROM_HTML_MODE_LEGACY
|
||||||
|
).toAnnotatedString()
|
||||||
}
|
}
|
||||||
AlertDialog(
|
AlertDialog(
|
||||||
onDismissRequest = onDismissRequest,
|
onDismissRequest = onDismissRequest,
|
||||||
|
|||||||
@ -185,7 +185,11 @@ fun MangaChapterListItem(
|
|||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
)
|
)
|
||||||
if (readProgress != null || scanlator != null/* SY --> */ || sourceName != null/* SY <-- */) DotSeparatorText()
|
if (
|
||||||
|
readProgress != null ||
|
||||||
|
scanlator != null/* SY --> */ ||
|
||||||
|
sourceName != null/* SY <-- */
|
||||||
|
) DotSeparatorText()
|
||||||
}
|
}
|
||||||
if (readProgress != null) {
|
if (readProgress != null) {
|
||||||
Text(
|
Text(
|
||||||
|
|||||||
@ -45,9 +45,12 @@ fun PagePreviews(
|
|||||||
) {
|
) {
|
||||||
when (pagePreviewState) {
|
when (pagePreviewState) {
|
||||||
PagePreviewState.Loading -> {
|
PagePreviewState.Loading -> {
|
||||||
Box(modifier = Modifier
|
Box(
|
||||||
.height(60.dp)
|
modifier = Modifier
|
||||||
.fillMaxWidth(), contentAlignment = Alignment.Center) {
|
.height(60.dp)
|
||||||
|
.fillMaxWidth(),
|
||||||
|
contentAlignment = Alignment.Center,
|
||||||
|
) {
|
||||||
CircularProgressIndicator()
|
CircularProgressIndicator()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -117,7 +117,12 @@ fun ConfigureExhDialog(run: Boolean, onRunning: () -> Unit) {
|
|||||||
Text(text = stringResource(R.string.eh_settings_configuration_failed))
|
Text(text = stringResource(R.string.eh_settings_configuration_failed))
|
||||||
},
|
},
|
||||||
text = {
|
text = {
|
||||||
Text(text = stringResource(R.string.eh_settings_configuration_failed_message, configureFailedDialogOpen?.message.orEmpty()))
|
Text(
|
||||||
|
text = stringResource(
|
||||||
|
R.string.eh_settings_configuration_failed_message,
|
||||||
|
configureFailedDialogOpen?.message.orEmpty()
|
||||||
|
)
|
||||||
|
)
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -262,7 +262,9 @@ object SettingsAdvancedScreen : SearchableSettings {
|
|||||||
clearSslPreferences()
|
clearSslPreferences()
|
||||||
}
|
}
|
||||||
WebStorage.getInstance().deleteAllData()
|
WebStorage.getInstance().deleteAllData()
|
||||||
context.applicationInfo?.dataDir?.let { File("$it/app_webview/").deleteRecursively() }
|
context.applicationInfo?.dataDir?.let {
|
||||||
|
File("$it/app_webview/").deleteRecursively()
|
||||||
|
}
|
||||||
context.toast(R.string.webview_data_deleted)
|
context.toast(R.string.webview_data_deleted)
|
||||||
} catch (e: Throwable) {
|
} catch (e: Throwable) {
|
||||||
logcat(LogPriority.ERROR, e)
|
logcat(LogPriority.ERROR, e)
|
||||||
@ -487,7 +489,9 @@ object SettingsAdvancedScreen : SearchableSettings {
|
|||||||
|
|
||||||
mangaFolders.forEach mangaFolder@{ mangaFolder ->
|
mangaFolders.forEach mangaFolder@{ mangaFolder ->
|
||||||
val manga =
|
val manga =
|
||||||
sourceManga.find { (_, folderName) -> folderName == mangaFolder.name }?.first
|
sourceManga.find { (_, folderName) ->
|
||||||
|
folderName == mangaFolder.name
|
||||||
|
}?.first
|
||||||
if (manga == null) {
|
if (manga == null) {
|
||||||
// download is orphaned delete it
|
// download is orphaned delete it
|
||||||
foldersCleared += 1 + (
|
foldersCleared += 1 + (
|
||||||
@ -591,7 +595,8 @@ object SettingsAdvancedScreen : SearchableSettings {
|
|||||||
enabled = dataSaver != DataSaver.NONE,
|
enabled = dataSaver != DataSaver.NONE,
|
||||||
),
|
),
|
||||||
kotlin.run {
|
kotlin.run {
|
||||||
val dataSaverImageFormatJpeg by sourcePreferences.dataSaverImageFormatJpeg().collectAsState()
|
val dataSaverImageFormatJpeg by sourcePreferences.dataSaverImageFormatJpeg()
|
||||||
|
.collectAsState()
|
||||||
Preference.PreferenceItem.SwitchPreference(
|
Preference.PreferenceItem.SwitchPreference(
|
||||||
pref = sourcePreferences.dataSaverImageFormatJpeg(),
|
pref = sourcePreferences.dataSaverImageFormatJpeg(),
|
||||||
title = stringResource(R.string.data_saver_image_format),
|
title = stringResource(R.string.data_saver_image_format),
|
||||||
@ -677,8 +682,10 @@ object SettingsAdvancedScreen : SearchableSettings {
|
|||||||
text = {
|
text = {
|
||||||
Text(
|
Text(
|
||||||
text = remember {
|
text = remember {
|
||||||
HtmlCompat.fromHtml(context.getString(R.string.encrypt_database_message), HtmlCompat.FROM_HTML_MODE_COMPACT)
|
HtmlCompat.fromHtml(
|
||||||
.toAnnotatedString()
|
context.getString(R.string.encrypt_database_message),
|
||||||
|
HtmlCompat.FROM_HTML_MODE_COMPACT
|
||||||
|
).toAnnotatedString()
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
@ -716,8 +723,10 @@ object SettingsAdvancedScreen : SearchableSettings {
|
|||||||
Preference.PreferenceItem.TextPreference(
|
Preference.PreferenceItem.TextPreference(
|
||||||
title = stringResource(R.string.open_debug_menu),
|
title = stringResource(R.string.open_debug_menu),
|
||||||
subtitle = remember {
|
subtitle = remember {
|
||||||
HtmlCompat.fromHtml(context.getString(R.string.open_debug_menu_summary), HtmlCompat.FROM_HTML_MODE_COMPACT)
|
HtmlCompat.fromHtml(
|
||||||
.toAnnotatedString()
|
context.getString(R.string.open_debug_menu_summary),
|
||||||
|
HtmlCompat.FROM_HTML_MODE_COMPACT
|
||||||
|
).toAnnotatedString()
|
||||||
},
|
},
|
||||||
onClick = { navigator.push(SettingsDebugScreen()) },
|
onClick = { navigator.push(SettingsDebugScreen()) },
|
||||||
),
|
),
|
||||||
|
|||||||
@ -55,7 +55,9 @@ object SettingsLibraryScreen : SearchableSettings {
|
|||||||
override fun getPreferences(): List<Preference> {
|
override fun getPreferences(): List<Preference> {
|
||||||
val getCategories = remember { Injekt.get<GetCategories>() }
|
val getCategories = remember { Injekt.get<GetCategories>() }
|
||||||
val libraryPreferences = remember { Injekt.get<LibraryPreferences>() }
|
val libraryPreferences = remember { Injekt.get<LibraryPreferences>() }
|
||||||
val allCategories by getCategories.subscribe().collectAsState(initial = runBlocking { getCategories.await() })
|
val allCategories by getCategories.subscribe().collectAsState(
|
||||||
|
initial = runBlocking { getCategories.await() }
|
||||||
|
)
|
||||||
// SY -->
|
// SY -->
|
||||||
val unsortedPreferences = remember { Injekt.get<UnsortedPreferences>() }
|
val unsortedPreferences = remember { Injekt.get<UnsortedPreferences>() }
|
||||||
// SY <--
|
// SY <--
|
||||||
@ -207,7 +209,8 @@ object SettingsLibraryScreen : SearchableSettings {
|
|||||||
title = stringResource(R.string.library_group_updates),
|
title = stringResource(R.string.library_group_updates),
|
||||||
entries = mapOf(
|
entries = mapOf(
|
||||||
GroupLibraryMode.GLOBAL to stringResource(R.string.library_group_updates_global),
|
GroupLibraryMode.GLOBAL to stringResource(R.string.library_group_updates_global),
|
||||||
GroupLibraryMode.ALL_BUT_UNGROUPED to stringResource(R.string.library_group_updates_all_but_ungrouped),
|
GroupLibraryMode.ALL_BUT_UNGROUPED to
|
||||||
|
stringResource(R.string.library_group_updates_all_but_ungrouped),
|
||||||
GroupLibraryMode.ALL to stringResource(R.string.library_group_updates_all),
|
GroupLibraryMode.ALL to stringResource(R.string.library_group_updates_all),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -78,7 +78,8 @@ class DebugInfoScreen : Screen() {
|
|||||||
value = when (result) {
|
value = when (result) {
|
||||||
ProfileVerifier.CompilationStatus.RESULT_CODE_NO_PROFILE -> "No profile installed"
|
ProfileVerifier.CompilationStatus.RESULT_CODE_NO_PROFILE -> "No profile installed"
|
||||||
ProfileVerifier.CompilationStatus.RESULT_CODE_COMPILED_WITH_PROFILE -> "Compiled"
|
ProfileVerifier.CompilationStatus.RESULT_CODE_COMPILED_WITH_PROFILE -> "Compiled"
|
||||||
ProfileVerifier.CompilationStatus.RESULT_CODE_COMPILED_WITH_PROFILE_NON_MATCHING -> "Compiled non-matching"
|
ProfileVerifier.CompilationStatus.RESULT_CODE_COMPILED_WITH_PROFILE_NON_MATCHING ->
|
||||||
|
"Compiled non-matching"
|
||||||
ProfileVerifier.CompilationStatus.RESULT_CODE_ERROR_CACHE_FILE_EXISTS_BUT_CANNOT_BE_READ,
|
ProfileVerifier.CompilationStatus.RESULT_CODE_ERROR_CACHE_FILE_EXISTS_BUT_CANNOT_BE_READ,
|
||||||
ProfileVerifier.CompilationStatus.RESULT_CODE_ERROR_CANT_WRITE_PROFILE_VERIFICATION_RESULT_CACHE_FILE,
|
ProfileVerifier.CompilationStatus.RESULT_CODE_ERROR_CANT_WRITE_PROFILE_VERIFICATION_RESULT_CACHE_FILE,
|
||||||
ProfileVerifier.CompilationStatus.RESULT_CODE_ERROR_PACKAGE_NAME_DOES_NOT_EXIST,
|
ProfileVerifier.CompilationStatus.RESULT_CODE_ERROR_PACKAGE_NAME_DOES_NOT_EXIST,
|
||||||
|
|||||||
@ -7,6 +7,7 @@ internal object BackupCreateFlags {
|
|||||||
const val BACKUP_TRACK = 0x8
|
const val BACKUP_TRACK = 0x8
|
||||||
const val BACKUP_APP_PREFS = 0x10
|
const val BACKUP_APP_PREFS = 0x10
|
||||||
const val BACKUP_SOURCE_PREFS = 0x20
|
const val BACKUP_SOURCE_PREFS = 0x20
|
||||||
|
|
||||||
// SY -->
|
// SY -->
|
||||||
const val BACKUP_CUSTOM_INFO = 0x40
|
const val BACKUP_CUSTOM_INFO = 0x40
|
||||||
const val BACKUP_READ_MANGA = 0x80
|
const val BACKUP_READ_MANGA = 0x80
|
||||||
|
|||||||
@ -159,13 +159,13 @@ class MangaScreen(
|
|||||||
openMangaInWebView(
|
openMangaInWebView(
|
||||||
navigator,
|
navigator,
|
||||||
screenModel.manga,
|
screenModel.manga,
|
||||||
screenModel.source
|
screenModel.source,
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
openMergedMangaWebview(
|
openMergedMangaWebview(
|
||||||
context,
|
context,
|
||||||
navigator,
|
navigator,
|
||||||
successState.mergedData
|
successState.mergedData,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}.takeIf { isHttpSource },
|
}.takeIf { isHttpSource },
|
||||||
|
|||||||
@ -15,8 +15,8 @@ import eu.kanade.domain.chapter.interactor.GetAvailableScanlators
|
|||||||
import eu.kanade.domain.chapter.interactor.SetReadStatus
|
import eu.kanade.domain.chapter.interactor.SetReadStatus
|
||||||
import eu.kanade.domain.chapter.interactor.SyncChaptersWithSource
|
import eu.kanade.domain.chapter.interactor.SyncChaptersWithSource
|
||||||
import eu.kanade.domain.manga.interactor.GetExcludedScanlators
|
import eu.kanade.domain.manga.interactor.GetExcludedScanlators
|
||||||
import eu.kanade.domain.manga.interactor.SetExcludedScanlators
|
|
||||||
import eu.kanade.domain.manga.interactor.GetPagePreviews
|
import eu.kanade.domain.manga.interactor.GetPagePreviews
|
||||||
|
import eu.kanade.domain.manga.interactor.SetExcludedScanlators
|
||||||
import eu.kanade.domain.manga.interactor.UpdateManga
|
import eu.kanade.domain.manga.interactor.UpdateManga
|
||||||
import eu.kanade.domain.manga.model.PagePreview
|
import eu.kanade.domain.manga.model.PagePreview
|
||||||
import eu.kanade.domain.manga.model.chaptersFiltered
|
import eu.kanade.domain.manga.model.chaptersFiltered
|
||||||
@ -52,7 +52,6 @@ import exh.debug.DebugToggles
|
|||||||
import exh.eh.EHentaiUpdateHelper
|
import exh.eh.EHentaiUpdateHelper
|
||||||
import exh.log.xLogD
|
import exh.log.xLogD
|
||||||
import exh.md.utils.FollowStatus
|
import exh.md.utils.FollowStatus
|
||||||
import exh.md.utils.MdUtil
|
|
||||||
import exh.metadata.metadata.RaisedSearchMetadata
|
import exh.metadata.metadata.RaisedSearchMetadata
|
||||||
import exh.metadata.metadata.base.FlatMetadata
|
import exh.metadata.metadata.base.FlatMetadata
|
||||||
import exh.source.MERGED_SOURCE_ID
|
import exh.source.MERGED_SOURCE_ID
|
||||||
|
|||||||
@ -818,7 +818,7 @@ class ReaderActivity : BaseActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
val defaultReaderType = manga.defaultReaderType(
|
val defaultReaderType = manga.defaultReaderType(
|
||||||
manga.mangaType(sourceName = sourceManager.get(manga.source)?.name)
|
manga.mangaType(sourceName = sourceManager.get(manga.source)?.name),
|
||||||
)
|
)
|
||||||
if (
|
if (
|
||||||
readerPreferences.useAutoWebtoon().get() &&
|
readerPreferences.useAutoWebtoon().get() &&
|
||||||
|
|||||||
@ -48,7 +48,6 @@ import eu.kanade.tachiyomi.util.lang.takeBytes
|
|||||||
import eu.kanade.tachiyomi.util.storage.DiskUtil
|
import eu.kanade.tachiyomi.util.storage.DiskUtil
|
||||||
import eu.kanade.tachiyomi.util.storage.DiskUtil.MAX_FILE_NAME_BYTES
|
import eu.kanade.tachiyomi.util.storage.DiskUtil.MAX_FILE_NAME_BYTES
|
||||||
import eu.kanade.tachiyomi.util.storage.cacheImageDir
|
import eu.kanade.tachiyomi.util.storage.cacheImageDir
|
||||||
import exh.md.utils.MdUtil
|
|
||||||
import exh.metadata.metadata.RaisedSearchMetadata
|
import exh.metadata.metadata.RaisedSearchMetadata
|
||||||
import exh.source.MERGED_SOURCE_ID
|
import exh.source.MERGED_SOURCE_ID
|
||||||
import exh.source.getMainSource
|
import exh.source.getMainSource
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user