Build fixes
This commit is contained in:
parent
38907e81c8
commit
d669a764a4
@ -25,6 +25,7 @@ import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.focus.FocusRequester
|
||||
import androidx.compose.ui.focus.focusRequester
|
||||
import dev.icerock.moko.resources.StringResource
|
||||
import eu.kanade.core.preference.asToggleableState
|
||||
import eu.kanade.presentation.category.visualName
|
||||
import kotlinx.collections.immutable.ImmutableList
|
||||
@ -42,6 +43,11 @@ fun CategoryCreateDialog(
|
||||
onDismissRequest: () -> Unit,
|
||||
onCreate: (String) -> Unit,
|
||||
categories: ImmutableList<String>,
|
||||
// SY -->
|
||||
title: String = stringResource(MR.strings.action_add_category),
|
||||
extraMessage: String? = null,
|
||||
alreadyExistsError: StringResource = MR.strings.error_category_exists,
|
||||
// SY <--
|
||||
) {
|
||||
var name by remember { mutableStateOf("") }
|
||||
|
||||
@ -67,9 +73,16 @@ fun CategoryCreateDialog(
|
||||
}
|
||||
},
|
||||
title = {
|
||||
Text(text = stringResource(MR.strings.action_add_category))
|
||||
// SY -->
|
||||
Text(text = title)
|
||||
// SY <--
|
||||
},
|
||||
text = {
|
||||
// SY -->
|
||||
Column {
|
||||
extraMessage?.let { Text(it) }
|
||||
// SY <--
|
||||
|
||||
OutlinedTextField(
|
||||
modifier = Modifier
|
||||
.focusRequester(focusRequester),
|
||||
@ -80,7 +93,9 @@ fun CategoryCreateDialog(
|
||||
},
|
||||
supportingText = {
|
||||
val msgRes = if (name.isNotEmpty() && nameAlreadyExists) {
|
||||
MR.strings.error_category_exists
|
||||
// SY -->
|
||||
alreadyExistsError
|
||||
// SY <--
|
||||
} else {
|
||||
MR.strings.information_required_plain
|
||||
}
|
||||
@ -89,6 +104,9 @@ fun CategoryCreateDialog(
|
||||
isError = name.isNotEmpty() && nameAlreadyExists,
|
||||
singleLine = true,
|
||||
)
|
||||
// SY -->
|
||||
}
|
||||
// SY <--
|
||||
},
|
||||
)
|
||||
|
||||
@ -167,7 +185,11 @@ fun CategoryRenameDialog(
|
||||
fun CategoryDeleteDialog(
|
||||
onDismissRequest: () -> Unit,
|
||||
onDelete: () -> Unit,
|
||||
category: String,
|
||||
// SY -->
|
||||
category: String = "",
|
||||
title: String = stringResource(MR.strings.delete_category),
|
||||
text: String = stringResource(MR.strings.delete_category_confirmation, category),
|
||||
// SY <--
|
||||
) {
|
||||
AlertDialog(
|
||||
onDismissRequest = onDismissRequest,
|
||||
@ -185,10 +207,14 @@ fun CategoryDeleteDialog(
|
||||
}
|
||||
},
|
||||
title = {
|
||||
Text(text = stringResource(MR.strings.delete_category))
|
||||
// SY -->
|
||||
Text(text = title)
|
||||
// SY <--
|
||||
},
|
||||
text = {
|
||||
Text(text = stringResource(MR.strings.delete_category_confirmation, category))
|
||||
// SY -->
|
||||
Text(text = text)
|
||||
// SY <--
|
||||
},
|
||||
)
|
||||
}
|
||||
|
@ -214,7 +214,7 @@ open class FeedScreenModel(
|
||||
if (savedSearch != null) {
|
||||
source?.name ?: feed.source.toString()
|
||||
} else {
|
||||
LocaleHelper.getDisplayName(source?.lang)
|
||||
LocaleHelper.getLocalizedDisplayName(source?.lang)
|
||||
},
|
||||
results,
|
||||
)
|
||||
|
@ -24,6 +24,7 @@ import androidx.compose.runtime.CompositionLocalProvider
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.produceState
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.rememberCoroutineScope
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.semantics.contentDescription
|
||||
|
@ -40,7 +40,7 @@ internal class RarPageLoader(file: File) : PageLoader() {
|
||||
val pageOutputStream = File(tmpDir, header.fileName.substringAfterLast("/"))
|
||||
.also { it.createNewFile() }
|
||||
.outputStream()
|
||||
getStream(rar, header).use {
|
||||
getStream(header).use {
|
||||
it.copyTo(pageOutputStream)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user