mirror of
https://github.com/Suwayomi/TachideskJUI.git
synced 2025-12-23 21:12:34 +01:00
Lint
This commit is contained in:
@@ -21,4 +21,4 @@ actual class PreferenceStoreFactory @Inject constructor(private val context: Con
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,4 +8,4 @@ package ca.gosyer.core.io
|
||||
|
||||
import okio.FileSystem
|
||||
|
||||
expect val FileSystem.Companion.SYSTEM: FileSystem
|
||||
expect val FileSystem.Companion.SYSTEM: FileSystem
|
||||
|
||||
@@ -9,4 +9,4 @@ package ca.gosyer.core.lang
|
||||
import kotlinx.coroutines.CoroutineDispatcher
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
|
||||
expect val Dispatchers.IO: CoroutineDispatcher
|
||||
expect val Dispatchers.IO: CoroutineDispatcher
|
||||
|
||||
@@ -8,4 +8,4 @@ package ca.gosyer.core.lang
|
||||
|
||||
import io.fluidsonic.locale.Locale
|
||||
|
||||
expect fun Locale.Companion.getDefault(): Locale
|
||||
expect fun Locale.Companion.getDefault(): Locale
|
||||
|
||||
@@ -16,4 +16,4 @@ fun String.chop(count: Int, replacement: String = "…"): String {
|
||||
} else {
|
||||
this
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,4 +8,4 @@ package ca.gosyer.core.prefs
|
||||
|
||||
expect class PreferenceStoreFactory {
|
||||
fun create(vararg names: String): PreferenceStore
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,4 +10,4 @@ import okio.FileSystem
|
||||
|
||||
@Suppress("EXTENSION_SHADOWED_BY_MEMBER")
|
||||
actual val FileSystem.Companion.SYSTEM: FileSystem
|
||||
get() = SYSTEM
|
||||
get() = SYSTEM
|
||||
|
||||
@@ -11,4 +11,4 @@ import kotlinx.coroutines.Dispatchers
|
||||
|
||||
@Suppress("EXTENSION_SHADOWED_BY_MEMBER")
|
||||
actual val Dispatchers.IO: CoroutineDispatcher
|
||||
get() = IO
|
||||
get() = IO
|
||||
|
||||
@@ -10,4 +10,4 @@ import io.fluidsonic.locale.Locale
|
||||
import io.fluidsonic.locale.toCommon
|
||||
import java.util.Locale as PlatformLocale
|
||||
|
||||
actual fun Locale.Companion.getDefault(): Locale = PlatformLocale.getDefault().toCommon()
|
||||
actual fun Locale.Companion.getDefault(): Locale = PlatformLocale.getDefault().toCommon()
|
||||
|
||||
@@ -11,11 +11,13 @@ import kotlinx.serialization.Serializable
|
||||
@Serializable
|
||||
enum class Sort {
|
||||
ALPHABETICAL,
|
||||
|
||||
// LAST_READ,
|
||||
// LAST_CHECKED,
|
||||
UNREAD,
|
||||
|
||||
// TOTAL_CHAPTERS,
|
||||
// LATEST_CHAPTER,
|
||||
// DATE_FETCHED,
|
||||
DATE_ADDED;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,11 +20,11 @@ data class Source(
|
||||
val displayName: String
|
||||
) {
|
||||
val displayLang: String
|
||||
get() = if (id == LOCAL_SOURCE_ID) {
|
||||
"other"
|
||||
} else {
|
||||
lang
|
||||
}
|
||||
get() = if (id == LOCAL_SOURCE_ID) {
|
||||
"other"
|
||||
} else {
|
||||
lang
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val LOCAL_SOURCE_LANG = "localsourcelang"
|
||||
|
||||
@@ -25,4 +25,4 @@ internal actual fun startDownloadService(
|
||||
action = actions.name
|
||||
}
|
||||
ContextCompat.startForegroundService(context, intent)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,4 +16,4 @@ internal actual fun startDownloadService(
|
||||
actions: WebsocketService.Actions
|
||||
) {
|
||||
downloadService.init()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,4 +11,4 @@ import java.util.Locale
|
||||
fun localeToString(locale: String) = Locale.forLanguageTag(locale)
|
||||
?.getDisplayLanguage(Locale.getDefault())
|
||||
?.ifBlank { null }
|
||||
?: locale.uppercase()
|
||||
?: locale.uppercase()
|
||||
|
||||
@@ -109,6 +109,5 @@ class KamelConfigProvider @Inject constructor(
|
||||
val bytes = response.receive<ByteReadChannel>()
|
||||
send(Resource.Success(bytes))
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,4 +14,4 @@ internal expect fun startDownloadService(
|
||||
contextWrapper: ContextWrapper,
|
||||
downloadService: DownloadService,
|
||||
actions: WebsocketService.Actions
|
||||
)
|
||||
)
|
||||
|
||||
@@ -24,4 +24,4 @@ fun StartScreen.toScreenClazz() = when (this) {
|
||||
StartScreen.Updates -> UpdatesScreen::class
|
||||
StartScreen.Sources -> SourcesScreen::class
|
||||
StartScreen.Extensions -> ExtensionsScreen::class
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,9 +42,9 @@ import androidx.compose.ui.util.fastForEach
|
||||
import ca.gosyer.data.models.Category
|
||||
import ca.gosyer.data.models.Manga
|
||||
import ca.gosyer.i18n.MR
|
||||
import ca.gosyer.ui.base.dialog.getMaterialDialogProperties
|
||||
import ca.gosyer.uicore.components.VerticalScrollbar
|
||||
import ca.gosyer.uicore.components.rememberScrollbarAdapter
|
||||
import ca.gosyer.ui.base.dialog.getMaterialDialogProperties
|
||||
import ca.gosyer.uicore.image.KamelImage
|
||||
import ca.gosyer.uicore.resources.stringResource
|
||||
import com.google.accompanist.flowlayout.FlowRow
|
||||
|
||||
@@ -421,7 +421,6 @@ fun SourceToolbar(
|
||||
},
|
||||
openDisplayModeSelect = { displayModeSelectOpen = true }
|
||||
)
|
||||
|
||||
}
|
||||
)
|
||||
}
|
||||
@@ -447,7 +446,6 @@ fun DisplayModeSelect(
|
||||
Text(stringResource(it.res))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,9 +36,9 @@ import androidx.compose.ui.unit.dp
|
||||
import ca.gosyer.i18n.MR
|
||||
import ca.gosyer.ui.base.components.CursorPoint
|
||||
import ca.gosyer.ui.base.components.TooltipArea
|
||||
import ca.gosyer.ui.sources.home.SourceHomeScreen
|
||||
import ca.gosyer.uicore.components.VerticalScrollbar
|
||||
import ca.gosyer.uicore.components.rememberScrollbarAdapter
|
||||
import ca.gosyer.ui.sources.home.SourceHomeScreen
|
||||
import ca.gosyer.uicore.image.KamelImage
|
||||
import ca.gosyer.uicore.resources.stringResource
|
||||
import io.kamel.image.lazyPainterResource
|
||||
|
||||
@@ -50,4 +50,4 @@ class GlobalSearchScreen(private val initialQuery: String) : Screen {
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,4 +182,4 @@ fun GlobalSearchItem(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ internal actual fun RealDropdownMenu(
|
||||
offset = offset,
|
||||
content = content
|
||||
)
|
||||
|
||||
@Composable
|
||||
internal actual fun RealDropdownMenuItem(
|
||||
onClick: () -> Unit,
|
||||
@@ -66,4 +67,4 @@ fun SecureFlagPolicy.toAndroidSecureFlagPolicy() = when (this) {
|
||||
SecureFlagPolicy.Inherit -> AndroidSecureFlagPolicy.Inherit
|
||||
SecureFlagPolicy.SecureOn -> AndroidSecureFlagPolicy.SecureOn
|
||||
SecureFlagPolicy.SecureOff -> AndroidSecureFlagPolicy.SecureOff
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,4 +15,4 @@ import dev.icerock.moko.resources.FileResource
|
||||
actual fun FileResource.rememberReadText(): String {
|
||||
val context = LocalContext.current
|
||||
return remember(context) { readText(context) }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,4 +63,4 @@ fun AroundLayout(
|
||||
}
|
||||
}
|
||||
|
||||
private enum class AroundLayoutContent { Start, MainContent, End }
|
||||
private enum class AroundLayoutContent { Start, MainContent, End }
|
||||
|
||||
@@ -34,6 +34,7 @@ enum class SecureFlagPolicy {
|
||||
* policy.
|
||||
*/
|
||||
SecureOn,
|
||||
|
||||
/**
|
||||
* No [WindowManager.LayoutParams.FLAG_SECURE] will be set on the window that is using this
|
||||
* policy.
|
||||
@@ -92,4 +93,4 @@ fun DropdownMenuItem(
|
||||
contentPadding: PaddingValues = MenuDefaults.DropdownMenuItemContentPadding,
|
||||
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
|
||||
content: @Composable RowScope.() -> Unit
|
||||
) = RealDropdownMenuItem(onClick, modifier, enabled, contentPadding, interactionSource, content)
|
||||
) = RealDropdownMenuItem(onClick, modifier, enabled, contentPadding, interactionSource, content)
|
||||
|
||||
@@ -10,4 +10,4 @@ import androidx.compose.runtime.Composable
|
||||
import dev.icerock.moko.resources.FileResource
|
||||
|
||||
@Composable
|
||||
expect fun FileResource.rememberReadText(): String
|
||||
expect fun FileResource.rememberReadText(): String
|
||||
|
||||
@@ -16,4 +16,4 @@ expect class ContextWrapper {
|
||||
enum class Length {
|
||||
SHORT,
|
||||
LONG
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ internal actual fun RealDropdownMenu(
|
||||
offset = offset,
|
||||
content = content
|
||||
)
|
||||
|
||||
@Composable
|
||||
internal actual fun RealDropdownMenuItem(
|
||||
onClick: () -> Unit,
|
||||
@@ -45,4 +46,4 @@ internal actual fun RealDropdownMenuItem(
|
||||
contentPadding = contentPadding,
|
||||
interactionSource = interactionSource,
|
||||
content = content
|
||||
)
|
||||
)
|
||||
|
||||
@@ -11,4 +11,4 @@ import androidx.compose.runtime.remember
|
||||
import dev.icerock.moko.resources.FileResource
|
||||
|
||||
@Composable
|
||||
actual fun FileResource.rememberReadText(): String = remember { readText() }
|
||||
actual fun FileResource.rememberReadText(): String = remember { readText() }
|
||||
|
||||
Reference in New Issue
Block a user