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