diff --git a/android/src/main/kotlin/ca/gosyer/jui/android/data/notification/Notifications.kt b/android/src/main/kotlin/ca/gosyer/jui/android/data/notification/Notifications.kt index a0753356..4ee750e6 100644 --- a/android/src/main/kotlin/ca/gosyer/jui/android/data/notification/Notifications.kt +++ b/android/src/main/kotlin/ca/gosyer/jui/android/data/notification/Notifications.kt @@ -41,7 +41,7 @@ object Notifications { }, buildNotificationChannelGroup(GROUP_APK_UPDATES) { setName(MR.strings.group_updates.desc().toString(context)) - }, + } ) ) diff --git a/data/src/commonMain/kotlin/ca/gosyer/jui/data/backup/BackupRepositoryImpl.kt b/data/src/commonMain/kotlin/ca/gosyer/jui/data/backup/BackupRepositoryImpl.kt index 38d89b92..9d2a2af3 100644 --- a/data/src/commonMain/kotlin/ca/gosyer/jui/data/backup/BackupRepositoryImpl.kt +++ b/data/src/commonMain/kotlin/ca/gosyer/jui/data/backup/BackupRepositoryImpl.kt @@ -41,7 +41,8 @@ class BackupRepositoryImpl @Inject constructor( private fun buildFormData(file: Path) = formData { append( - "backup.proto.gz", FileSystem.SYSTEM.source(file).buffer().readByteArray(), + "backup.proto.gz", + FileSystem.SYSTEM.source(file).buffer().readByteArray(), Headers.build { append(HttpHeaders.ContentType, ContentType.MultiPart.FormData.toString()) append(HttpHeaders.ContentDisposition, "filename=backup.proto.gz") @@ -73,7 +74,7 @@ class BackupRepositoryImpl @Inject constructor( override fun exportBackupFile(block: HttpRequestBuilder.() -> Unit) = flow { val response = client.get( - buildUrl { path(backupFileExportRequest()) }, + buildUrl { path(backupFileExportRequest()) } ) { expectSuccess = true block() diff --git a/data/src/commonMain/kotlin/ca/gosyer/jui/data/category/CategoryRepositoryImpl.kt b/data/src/commonMain/kotlin/ca/gosyer/jui/data/category/CategoryRepositoryImpl.kt index 1a2a504f..d5a06de6 100644 --- a/data/src/commonMain/kotlin/ca/gosyer/jui/data/category/CategoryRepositoryImpl.kt +++ b/data/src/commonMain/kotlin/ca/gosyer/jui/data/category/CategoryRepositoryImpl.kt @@ -42,7 +42,7 @@ class CategoryRepositoryImpl @Inject constructor( override fun getMangaCategories(mangaId: Long) = flow { val response = client.get( - buildUrl { path(getMangaCategoriesQuery(mangaId)) }, + buildUrl { path(getMangaCategoriesQuery(mangaId)) } ) { expectSuccess = true }.body>() @@ -69,7 +69,7 @@ class CategoryRepositoryImpl @Inject constructor( override fun getCategories(dropDefault: Boolean) = flow { val response = client.get( - buildUrl { path(getCategoriesQuery()) }, + buildUrl { path(getCategoriesQuery()) } ) { expectSuccess = true }.body>().let { categories -> @@ -126,7 +126,7 @@ class CategoryRepositoryImpl @Inject constructor( override fun deleteCategory(categoryId: Long) = flow { val response = client.delete( - buildUrl { path(categoryDeleteRequest(categoryId)) }, + buildUrl { path(categoryDeleteRequest(categoryId)) } ) { expectSuccess = true } @@ -135,7 +135,7 @@ class CategoryRepositoryImpl @Inject constructor( override fun getMangaFromCategory(categoryId: Long) = flow { val response = client.get( - buildUrl { path(getMangaInCategoryQuery(categoryId)) }, + buildUrl { path(getMangaInCategoryQuery(categoryId)) } ) { expectSuccess = true }.body>() diff --git a/data/src/commonMain/kotlin/ca/gosyer/jui/data/download/DownloadRepositoryImpl.kt b/data/src/commonMain/kotlin/ca/gosyer/jui/data/download/DownloadRepositoryImpl.kt index 5bca7875..08acba3d 100644 --- a/data/src/commonMain/kotlin/ca/gosyer/jui/data/download/DownloadRepositoryImpl.kt +++ b/data/src/commonMain/kotlin/ca/gosyer/jui/data/download/DownloadRepositoryImpl.kt @@ -29,7 +29,7 @@ class DownloadRepositoryImpl @Inject constructor( override fun startDownloading() = flow { val response = client.get( - buildUrl { path(downloadsStartRequest()) }, + buildUrl { path(downloadsStartRequest()) } ) { expectSuccess = true } @@ -38,7 +38,7 @@ class DownloadRepositoryImpl @Inject constructor( override fun stopDownloading() = flow { val response = client.get( - buildUrl { path(downloadsStopRequest()) }, + buildUrl { path(downloadsStopRequest()) } ) { expectSuccess = true } @@ -47,7 +47,7 @@ class DownloadRepositoryImpl @Inject constructor( override fun clearDownloadQueue() = flow { val response = client.get( - buildUrl { path(downloadsClearRequest()) }, + buildUrl { path(downloadsClearRequest()) } ) { expectSuccess = true } diff --git a/data/src/commonMain/kotlin/ca/gosyer/jui/data/extension/ExtensionRepositoryImpl.kt b/data/src/commonMain/kotlin/ca/gosyer/jui/data/extension/ExtensionRepositoryImpl.kt index 64ab3f7c..0ba1fa62 100644 --- a/data/src/commonMain/kotlin/ca/gosyer/jui/data/extension/ExtensionRepositoryImpl.kt +++ b/data/src/commonMain/kotlin/ca/gosyer/jui/data/extension/ExtensionRepositoryImpl.kt @@ -35,7 +35,7 @@ class ExtensionRepositoryImpl @Inject constructor( override fun getExtensionList() = flow { val response = client.get( - buildUrl { path(extensionListQuery()) }, + buildUrl { path(extensionListQuery()) } ) { expectSuccess = true }.body>() @@ -44,7 +44,7 @@ class ExtensionRepositoryImpl @Inject constructor( override fun installExtension(extension: Extension) = flow { val response = client.get( - buildUrl { path(apkInstallQuery(extension.pkgName)) }, + buildUrl { path(apkInstallQuery(extension.pkgName)) } ) { expectSuccess = true } @@ -53,7 +53,7 @@ class ExtensionRepositoryImpl @Inject constructor( override fun updateExtension(extension: Extension) = flow { val response = client.get( - buildUrl { path(apkUpdateQuery(extension.pkgName)) }, + buildUrl { path(apkUpdateQuery(extension.pkgName)) } ) { expectSuccess = true } @@ -62,7 +62,7 @@ class ExtensionRepositoryImpl @Inject constructor( override fun uninstallExtension(extension: Extension) = flow { val response = client.get( - buildUrl { path(apkUninstallQuery(extension.pkgName)) }, + buildUrl { path(apkUninstallQuery(extension.pkgName)) } ) { expectSuccess = true } @@ -71,7 +71,7 @@ class ExtensionRepositoryImpl @Inject constructor( override fun getApkIcon(extension: Extension, block: HttpRequestBuilder.() -> Unit) = flow { val response = client.get( - buildUrl { path(apkIconQuery(extension.apkName)) }, + buildUrl { path(apkIconQuery(extension.apkName)) } ) { expectSuccess = true block() diff --git a/data/src/commonMain/kotlin/ca/gosyer/jui/data/library/LibraryRepositoryImpl.kt b/data/src/commonMain/kotlin/ca/gosyer/jui/data/library/LibraryRepositoryImpl.kt index 50576ed7..b7601909 100644 --- a/data/src/commonMain/kotlin/ca/gosyer/jui/data/library/LibraryRepositoryImpl.kt +++ b/data/src/commonMain/kotlin/ca/gosyer/jui/data/library/LibraryRepositoryImpl.kt @@ -29,7 +29,7 @@ class LibraryRepositoryImpl @Inject constructor( override fun addMangaToLibrary(mangaId: Long) = flow { val response = client.get( - buildUrl { path(addMangaToLibraryQuery(mangaId)) }, + buildUrl { path(addMangaToLibraryQuery(mangaId)) } ) { expectSuccess = true } @@ -38,7 +38,7 @@ class LibraryRepositoryImpl @Inject constructor( override fun removeMangaFromLibrary(mangaId: Long) = flow { val response = client.delete( - buildUrl { path(removeMangaFromLibraryRequest(mangaId)) }, + buildUrl { path(removeMangaFromLibraryRequest(mangaId)) } ) { expectSuccess = true } diff --git a/data/src/commonMain/kotlin/ca/gosyer/jui/data/manga/MangaRepositoryImpl.kt b/data/src/commonMain/kotlin/ca/gosyer/jui/data/manga/MangaRepositoryImpl.kt index 6bbdad78..7c31bc08 100644 --- a/data/src/commonMain/kotlin/ca/gosyer/jui/data/manga/MangaRepositoryImpl.kt +++ b/data/src/commonMain/kotlin/ca/gosyer/jui/data/manga/MangaRepositoryImpl.kt @@ -41,7 +41,7 @@ class MangaRepositoryImpl @Inject constructor( if (refresh) { parameter("onlineFetch", true) } - }, + } ) { expectSuccess = true }.body() @@ -50,7 +50,7 @@ class MangaRepositoryImpl @Inject constructor( override fun getMangaThumbnail(mangaId: Long, block: HttpRequestBuilder.() -> Unit) = flow { val response = client.get( - buildUrl { path(mangaThumbnailQuery(mangaId)) }, + buildUrl { path(mangaThumbnailQuery(mangaId)) } ) { expectSuccess = true block() @@ -60,7 +60,7 @@ class MangaRepositoryImpl @Inject constructor( override fun updateMangaMeta(mangaId: Long, key: String, value: String) = flow { val response = client.submitForm( - buildUrl { path(updateMangaMetaRequest(mangaId),) }, + buildUrl { path(updateMangaMetaRequest(mangaId)) }, formParameters = Parameters.build { append("key", key) append("value", value) diff --git a/data/src/commonMain/kotlin/ca/gosyer/jui/data/settings/SettingsRepositoryImpl.kt b/data/src/commonMain/kotlin/ca/gosyer/jui/data/settings/SettingsRepositoryImpl.kt index d0d82a97..09d895dc 100644 --- a/data/src/commonMain/kotlin/ca/gosyer/jui/data/settings/SettingsRepositoryImpl.kt +++ b/data/src/commonMain/kotlin/ca/gosyer/jui/data/settings/SettingsRepositoryImpl.kt @@ -31,7 +31,7 @@ class SettingsRepositoryImpl @Inject constructor( override fun aboutServer() = flow { val response = client.get( - buildUrl { path(aboutQuery()) }, + buildUrl { path(aboutQuery()) } ) { expectSuccess = true }.body() @@ -40,7 +40,7 @@ class SettingsRepositoryImpl @Inject constructor( override fun checkUpdate() = flow { val response = client.post( - buildUrl { path(checkUpdateQuery()) }, + buildUrl { path(checkUpdateQuery()) } ) { expectSuccess = true } diff --git a/data/src/commonMain/kotlin/ca/gosyer/jui/data/source/SourceRepositoryImpl.kt b/data/src/commonMain/kotlin/ca/gosyer/jui/data/source/SourceRepositoryImpl.kt index 119ab766..de62051b 100644 --- a/data/src/commonMain/kotlin/ca/gosyer/jui/data/source/SourceRepositoryImpl.kt +++ b/data/src/commonMain/kotlin/ca/gosyer/jui/data/source/SourceRepositoryImpl.kt @@ -48,7 +48,7 @@ class SourceRepositoryImpl @Inject constructor( override fun getSourceList() = flow { val response = client.get( - buildUrl { path(sourceListQuery()) }, + buildUrl { path(sourceListQuery()) } ) { expectSuccess = true }.body>() @@ -57,7 +57,7 @@ class SourceRepositoryImpl @Inject constructor( override fun getSourceInfo(sourceId: Long) = flow { val response = client.get( - buildUrl { path(sourceInfoQuery(sourceId)) }, + buildUrl { path(sourceInfoQuery(sourceId)) } ) { expectSuccess = true }.body() @@ -66,7 +66,7 @@ class SourceRepositoryImpl @Inject constructor( override fun getPopularManga(sourceId: Long, pageNum: Int) = flow { val response = client.get( - buildUrl { path(sourcePopularQuery(sourceId, pageNum)) }, + buildUrl { path(sourcePopularQuery(sourceId, pageNum)) } ) { expectSuccess = true }.body() @@ -75,7 +75,7 @@ class SourceRepositoryImpl @Inject constructor( override fun getLatestManga(sourceId: Long, pageNum: Int) = flow { val response = client.get( - buildUrl { path(sourceLatestQuery(sourceId, pageNum)) }, + buildUrl { path(sourceLatestQuery(sourceId, pageNum)) } ) { expectSuccess = true }.body() @@ -90,7 +90,7 @@ class SourceRepositoryImpl @Inject constructor( if (searchTerm.isNotBlank()) { parameter("searchTerm", searchTerm) } - }, + } ) { expectSuccess = true }.body() @@ -104,7 +104,7 @@ class SourceRepositoryImpl @Inject constructor( if (reset) { parameter("reset", true) } - }, + } ) { expectSuccess = true }.body>() @@ -113,7 +113,7 @@ class SourceRepositoryImpl @Inject constructor( override fun setFilter(sourceId: Long, sourceFilter: SourceFilterChange) = flow { val response = client.post( - buildUrl { path(setFilterRequest(sourceId)) }, + buildUrl { path(setFilterRequest(sourceId)) } ) { contentType(ContentType.Application.Json) setBody(sourceFilter) @@ -137,7 +137,7 @@ class SourceRepositoryImpl @Inject constructor( override fun getSourceSettings(sourceId: Long) = flow { val response = client.get( - buildUrl { path(getSourceSettingsQuery(sourceId)) }, + buildUrl { path(getSourceSettingsQuery(sourceId)) } ) { expectSuccess = true }.body>() @@ -146,7 +146,7 @@ class SourceRepositoryImpl @Inject constructor( override fun setSourceSetting(sourceId: Long, sourcePreference: SourcePreferenceChange) = flow { val response = client.post( - buildUrl { path(updateSourceSettingQuery(sourceId)) }, + buildUrl { path(updateSourceSettingQuery(sourceId)) } ) { contentType(ContentType.Application.Json) setBody(sourcePreference) diff --git a/desktop/src/main/kotlin/ca/gosyer/jui/desktop/main.kt b/desktop/src/main/kotlin/ca/gosyer/jui/desktop/main.kt index c42997eb..817cc2ce 100644 --- a/desktop/src/main/kotlin/ca/gosyer/jui/desktop/main.kt +++ b/desktop/src/main/kotlin/ca/gosyer/jui/desktop/main.kt @@ -207,7 +207,7 @@ suspend fun main() { }, properties = getMaterialDialogProperties( size = DpSize(400.dp, 200.dp) - ), + ) ) { title(stringResource(MR.strings.confirm_exit)) message(stringResource(MR.strings.confirm_exit_message)) diff --git a/domain/src/commonMain/kotlin/ca/gosyer/jui/domain/download/model/DownloadStatus.kt b/domain/src/commonMain/kotlin/ca/gosyer/jui/domain/download/model/DownloadStatus.kt index b34f5ede..9babe6a2 100644 --- a/domain/src/commonMain/kotlin/ca/gosyer/jui/domain/download/model/DownloadStatus.kt +++ b/domain/src/commonMain/kotlin/ca/gosyer/jui/domain/download/model/DownloadStatus.kt @@ -11,5 +11,5 @@ import kotlinx.serialization.Serializable @Serializable data class DownloadStatus( val status: DownloaderStatus, - val queue: List, + val queue: List ) diff --git a/domain/src/commonMain/kotlin/ca/gosyer/jui/domain/reader/model/DefaultReaderMode.kt b/domain/src/commonMain/kotlin/ca/gosyer/jui/domain/reader/model/DefaultReaderMode.kt index ab0e1184..85ec3a02 100644 --- a/domain/src/commonMain/kotlin/ca/gosyer/jui/domain/reader/model/DefaultReaderMode.kt +++ b/domain/src/commonMain/kotlin/ca/gosyer/jui/domain/reader/model/DefaultReaderMode.kt @@ -12,7 +12,7 @@ enum class DefaultReaderMode( val direction: Direction = Direction.Down, val padding: Int = 0, val imageScale: ImageScale = ImageScale.FitScreen, - val navigationMode: NavigationMode = NavigationMode.LNavigation, + val navigationMode: NavigationMode = NavigationMode.LNavigation ) { RTL("RTL", false, Direction.Left, navigationMode = NavigationMode.RightAndLeftNavigation), LTR("LTR", false, Direction.Right, navigationMode = NavigationMode.RightAndLeftNavigation), diff --git a/presentation/src/androidMain/kotlin/ca/gosyer/jui/ui/base/file/AndroidFileSaver.kt b/presentation/src/androidMain/kotlin/ca/gosyer/jui/ui/base/file/AndroidFileSaver.kt index 1e2a11ef..532c19e1 100644 --- a/presentation/src/androidMain/kotlin/ca/gosyer/jui/ui/base/file/AndroidFileSaver.kt +++ b/presentation/src/androidMain/kotlin/ca/gosyer/jui/ui/base/file/AndroidFileSaver.kt @@ -17,7 +17,7 @@ import okio.Sink import okio.sink actual class FileSaver( - private val resultLauncher: ManagedActivityResultLauncher, + private val resultLauncher: ManagedActivityResultLauncher ) { actual fun save(name: String) { resultLauncher.launch(name) @@ -28,7 +28,7 @@ actual class FileSaver( actual fun rememberFileSaver( onFileSelected: (Sink) -> Unit, onCancel: () -> Unit, - onError: () -> Unit, + onError: () -> Unit ): FileSaver { val context = LocalContext.current val result = rememberLauncherForActivityResult(ActivityResultContracts.CreateDocument()) { diff --git a/presentation/src/androidMain/kotlin/ca/gosyer/jui/ui/main/about/licenses/components/AndroidLicenses.kt b/presentation/src/androidMain/kotlin/ca/gosyer/jui/ui/main/about/licenses/components/AndroidLicenses.kt index fe0cc534..a37ba5ea 100644 --- a/presentation/src/androidMain/kotlin/ca/gosyer/jui/ui/main/about/licenses/components/AndroidLicenses.kt +++ b/presentation/src/androidMain/kotlin/ca/gosyer/jui/ui/main/about/licenses/components/AndroidLicenses.kt @@ -45,7 +45,7 @@ actual fun InternalAboutLibraries( showLicenseBadges: Boolean, colors: LibraryColors, itemContentPadding: PaddingValues, - onLibraryClick: ((Library) -> Unit)?, + onLibraryClick: ((Library) -> Unit)? ) { Libraries( libraries = libraries, diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/base/chapter/ChapterDownloadButtons.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/base/chapter/ChapterDownloadButtons.kt index fc721fc2..c54f54bb 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/base/chapter/ChapterDownloadButtons.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/base/chapter/ChapterDownloadButtons.kt @@ -126,7 +126,7 @@ private fun DownloadIconButton(onClick: () -> Unit) { ) { Surface( shape = CircleShape, - border = BorderStroke(2.dp, LocalContentColor.current.copy(alpha = ContentAlpha.disabled)), + border = BorderStroke(2.dp, LocalContentColor.current.copy(alpha = ContentAlpha.disabled)) ) { Icon( Icons.Rounded.ArrowDownward, diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/base/file/FileSaver.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/base/file/FileSaver.kt index 7b8acedb..22a367d9 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/base/file/FileSaver.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/base/file/FileSaver.kt @@ -17,5 +17,5 @@ expect class FileSaver { expect fun rememberFileSaver( onFileSelected: (Sink) -> Unit, onCancel: () -> Unit = {}, - onError: () -> Unit = {}, + onError: () -> Unit = {} ): FileSaver diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/base/navigation/ActionMenu.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/base/navigation/ActionMenu.kt index 88fe2737..41291fe6 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/base/navigation/ActionMenu.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/base/navigation/ActionMenu.kt @@ -39,7 +39,7 @@ data class ActionItem( val icon: ImageVector? = null, val overflowMode: OverflowMode = OverflowMode.IF_NECESSARY, val enabled: Boolean = true, - val doAction: () -> Unit, + val doAction: () -> Unit ) { // allow 'calling' the action like a function operator fun invoke() = doAction() @@ -74,7 +74,7 @@ fun ActionMenu( TextButton(onClick = item.doAction, enabled = item.enabled) { Text( text = item.name, - color = MaterialTheme.colors.onPrimary.copy(alpha = LocalContentAlpha.current), + color = MaterialTheme.colors.onPrimary.copy(alpha = LocalContentAlpha.current) ) } } @@ -90,7 +90,7 @@ fun ActionMenu( ) DropdownMenu( expanded = menuVisible.value, - onDismissRequest = { menuVisible.value = false }, + onDismissRequest = { menuVisible.value = false } ) { overflowActions.fastForEach { item -> key(item.hashCode()) { diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/base/navigation/DisplayController.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/base/navigation/DisplayController.kt index bf115c60..4d66072e 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/base/navigation/DisplayController.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/base/navigation/DisplayController.kt @@ -17,7 +17,7 @@ val LocalDisplayController = compositionLocalOf { null } class DisplayController( - private val _sideMenuVisible: MutableState = mutableStateOf(true), + private val _sideMenuVisible: MutableState = mutableStateOf(true) ) { val sideMenuVisible by _sideMenuVisible diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/base/navigation/Toolbar.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/base/navigation/Toolbar.kt index 99a9a401..bf990902 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/base/navigation/Toolbar.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/base/navigation/Toolbar.kt @@ -88,7 +88,7 @@ fun Toolbar( elevation: Dp = Dp.Hairline, searchText: String? = null, search: ((String) -> Unit)? = null, - searchSubmit: (() -> Unit)? = null, + searchSubmit: (() -> Unit)? = null ) { BoxWithConstraints { if (maxWidth > 600.dp) { @@ -135,7 +135,7 @@ private fun WideToolbar( elevation: Dp, searchText: String?, search: ((String) -> Unit)?, - searchSubmit: (() -> Unit)?, + searchSubmit: (() -> Unit)? ) { Surface( modifier = modifier, @@ -204,7 +204,7 @@ private fun ThinToolbar( elevation: Dp, searchText: String?, search: ((String) -> Unit)?, - searchSubmit: (() -> Unit)?, + searchSubmit: (() -> Unit)? ) { var searchMode by remember { mutableStateOf(!searchText.isNullOrEmpty()) } fun closeSearch() { @@ -233,7 +233,7 @@ private fun ThinToolbar( } else { Row(Modifier.width(68.dp), verticalAlignment = Alignment.CenterVertically) { CompositionLocalProvider( - LocalContentAlpha provides ContentAlpha.high, + LocalContentAlpha provides ContentAlpha.high ) { IconButton( onClick = { @@ -296,7 +296,7 @@ private fun ThinToolbar( ) { ProvideTextStyle(value = MaterialTheme.typography.h6) { CompositionLocalProvider( - LocalContentAlpha provides ContentAlpha.high, + LocalContentAlpha provides ContentAlpha.high ) { Text(name, maxLines = 1, overflow = TextOverflow.Ellipsis) } @@ -308,7 +308,7 @@ private fun ThinToolbar( Row( Modifier.fillMaxHeight(), horizontalArrangement = Arrangement.End, - verticalAlignment = Alignment.CenterVertically, + verticalAlignment = Alignment.CenterVertically ) { if (search != null && !searchMode) { IconButton(onClick = { searchMode = true }) { @@ -373,7 +373,7 @@ fun TextActionIcon( text: String, icon: ImageVector, enabled: Boolean = true, - interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, + interactionSource: MutableInteractionSource = remember { MutableInteractionSource() } ) { Column( Modifier diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/base/prefs/ColorPickerDialog.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/base/prefs/ColorPickerDialog.kt index 27461c40..61760c63 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/base/prefs/ColorPickerDialog.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/base/prefs/ColorPickerDialog.kt @@ -78,7 +78,7 @@ fun ColorPickerDialog( title: String, onCloseRequest: () -> Unit = {}, onSelected: (Color) -> Unit, - initialColor: Color = Color.Unspecified, + initialColor: Color = Color.Unspecified ) { var currentColor by remember(initialColor) { mutableStateOf(initialColor) } var showPresets by remember { mutableStateOf(true) } @@ -444,5 +444,5 @@ private val presetColors = listOf( Color(0xFFFF9800), // ORANGE 500 Color(0xFF795548), // BROWN 500 Color(0xFF607D8B), // BLUE GREY 500 - Color(0xFF9E9E9E), // GREY 500 + Color(0xFF9E9E9E) // GREY 500 ) diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/base/prefs/PreferencesUiBuilder.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/base/prefs/PreferencesUiBuilder.kt index d556e18d..829ab93b 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/base/prefs/PreferencesUiBuilder.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/base/prefs/PreferencesUiBuilder.kt @@ -91,7 +91,7 @@ fun PreferenceRow( onLongClick: () -> Unit = {}, subtitle: String? = null, enabled: Boolean = true, - action: @Composable (BoxScope.() -> Unit)? = null, + action: @Composable (BoxScope.() -> Unit)? = null ) { val height = if (subtitle != null) 72.dp else 56.dp @@ -153,7 +153,7 @@ fun SwitchPreference( subtitle: String? = null, icon: ImageVector? = null, changeListener: () -> Unit = {}, - enabled: Boolean = true, + enabled: Boolean = true ) { PreferenceRow( title = title, @@ -200,7 +200,7 @@ fun EditTextPreference( } negativeButton(stringResource(MR.strings.action_cancel)) }, - properties = getMaterialDialogProperties(), + properties = getMaterialDialogProperties() ) { title(title) input( @@ -296,7 +296,7 @@ fun MultiSelectDialog( selected: List?, onCloseRequest: () -> Unit = {}, onFinished: (List) -> Unit, - title: String, + title: String ) { MaterialDialog( state, @@ -388,7 +388,7 @@ fun ExpandablePreference( title: String, startExpanded: Boolean = false, onExpandedChanged: ((Boolean) -> Unit)? = null, - expandedContent: @Composable ColumnScope.() -> Unit, + expandedContent: @Composable ColumnScope.() -> Unit ) { var expanded by remember { mutableStateOf(startExpanded) } LaunchedEffect(expanded) { @@ -424,14 +424,14 @@ fun ExpandablePreference( imageVector = Icons.Rounded.ArrowDropUp, contentDescription = "Expandable Arrow", modifier = Modifier.rotate(arrowRotationDegree) - .align(Alignment.CenterStart), + .align(Alignment.CenterStart) ) Text( text = title, modifier = Modifier .fillMaxWidth() .padding(16.dp), - textAlign = TextAlign.Center, + textAlign = TextAlign.Center ) } ExpandableContent( diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/base/theme/AppTheme.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/base/theme/AppTheme.kt index bf94d0b2..81185608 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/base/theme/AppTheme.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/base/theme/AppTheme.kt @@ -127,7 +127,7 @@ class AppThemeViewModel @Inject constructor( secondary = secondary, secondaryVariant = secondary, onPrimary = if (primary.luminance() > 0.5) Color.Black else Color.White, - onSecondary = if (secondary.luminance() > 0.5) Color.Black else Color.White, + onSecondary = if (secondary.luminance() > 0.5) Color.Black else Color.White ) } diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/categories/components/CategoriesDialogs.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/categories/components/CategoriesDialogs.kt index 9af78ff7..6ac6fe0a 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/categories/components/CategoriesDialogs.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/categories/components/CategoriesDialogs.kt @@ -33,7 +33,7 @@ fun RenameDialog( positiveButton(stringResource(MR.strings.action_rename)) negativeButton(stringResource(MR.strings.action_cancel)) }, - properties = getMaterialDialogProperties(), + properties = getMaterialDialogProperties() ) { title(stringResource(MR.strings.categories_rename)) input( @@ -62,7 +62,7 @@ fun DeleteDialog( } negativeButton(stringResource(MR.strings.action_no)) }, - properties = getMaterialDialogProperties(), + properties = getMaterialDialogProperties() ) { title(stringResource(MR.strings.categories_delete)) message(stringResource(MR.strings.categories_delete_confirm, category.name)) @@ -80,7 +80,7 @@ fun CreateDialog( positiveButton(stringResource(MR.strings.action_create)) negativeButton(stringResource(MR.strings.action_cancel)) }, - properties = getMaterialDialogProperties(), + properties = getMaterialDialogProperties() ) { title(stringResource(MR.strings.categories_create)) input( diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/categories/components/CategoriesScreenContent.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/categories/components/CategoriesScreenContent.kt index d7b5d035..9e18b46c 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/categories/components/CategoriesScreenContent.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/categories/components/CategoriesScreenContent.kt @@ -92,7 +92,7 @@ fun CategoriesScreenContent( ) { Box(Modifier.padding(it)) { val state = rememberLazyListState() - LazyColumn(modifier = Modifier.fillMaxSize(), state = state,) { + LazyColumn(modifier = Modifier.fillMaxSize(), state = state) { itemsIndexed(categories) { i, category -> val renameDialogState = rememberMaterialDialogState() val deleteDialogState = rememberMaterialDialogState() @@ -107,7 +107,7 @@ fun CategoriesScreenContent( }, onDelete = { deleteDialogState.show() - }, + } ) RenameDialog(renameDialogState, category) { renameCategory(category, it) @@ -147,7 +147,7 @@ private fun CategoryRow( onMoveUp: () -> Unit = {}, onMoveDown: () -> Unit = {}, onRename: () -> Unit = {}, - onDelete: () -> Unit = {}, + onDelete: () -> Unit = {} ) { Card(Modifier.padding(8.dp)) { Column { @@ -156,7 +156,7 @@ private fun CategoryRow( imageVector = Icons.Outlined.List, modifier = Modifier.padding(16.dp), tint = MaterialTheme.colors.primary, - contentDescription = null, + contentDescription = null ) Text( text = category.name, diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/downloads/components/DownloadsScreenContent.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/downloads/components/DownloadsScreenContent.kt index 84c0fb28..02176843 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/downloads/components/DownloadsScreenContent.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/downloads/components/DownloadsScreenContent.kt @@ -183,7 +183,7 @@ private fun getActionItems( downloadStatus: DownloaderStatus, startDownloading: () -> Unit, pauseDownloading: () -> Unit, - clearQueue: () -> Unit, + clearQueue: () -> Unit ): List { return listOf( if (downloadStatus == DownloaderStatus.Started) { diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/extensions/ExtensionsScreenViewModel.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/extensions/ExtensionsScreenViewModel.kt index 3e7efe7c..ead9a573 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/extensions/ExtensionsScreenViewModel.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/extensions/ExtensionsScreenViewModel.kt @@ -125,7 +125,7 @@ class ExtensionsScreenViewModel @Inject constructor( val available = filter { !it.installed }.sortedWith(comparator) return mapOf( - MR.strings.installed.toPlatformString() to (obsolete + updates + installed), + MR.strings.installed.toPlatformString() to (obsolete + updates + installed) ).filterNot { it.value.isEmpty() } + available.groupBy { it.lang }.mapKeys { if (it.key == "all") { MR.strings.all.toPlatformString() diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/extensions/components/ExtensionsScreenContent.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/extensions/components/ExtensionsScreenContent.kt index a2056788..b06851c0 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/extensions/components/ExtensionsScreenContent.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/extensions/components/ExtensionsScreenContent.kt @@ -209,7 +209,7 @@ fun LanguageDialog( positiveButton(stringResource(MR.strings.action_ok)) negativeButton(stringResource(MR.strings.action_cancel)) }, - properties = getMaterialDialogProperties(), + properties = getMaterialDialogProperties() ) { title(BuildKonfig.NAME) diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/library/components/LibraryMangaList.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/library/components/LibraryMangaList.kt index 22c8a976..4c14aea9 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/library/components/LibraryMangaList.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/library/components/LibraryMangaList.kt @@ -85,7 +85,7 @@ private fun LibraryMangaListItem( MangaListItem( modifier = modifier then Modifier .requiredHeight(56.dp) - .padding(horizontal = 16.dp), + .padding(horizontal = 16.dp) ) { MangaListItemImage( modifier = Modifier @@ -98,7 +98,7 @@ private fun LibraryMangaListItem( modifier = Modifier .weight(1f) .padding(horizontal = 16.dp), - text = manga.title, + text = manga.title ) Box(Modifier.width(IntrinsicSize.Min)) { LibraryMangaBadges( diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/library/components/LibraryScreenContent.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/library/components/LibraryScreenContent.kt index 45d0c9f2..c9fd19a4 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/library/components/LibraryScreenContent.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/library/components/LibraryScreenContent.kt @@ -342,7 +342,7 @@ fun ThinLibraryScreenContent( @Composable @Stable private fun getActionItems( - onToggleFiltersClick: () -> Unit, + onToggleFiltersClick: () -> Unit ): List { return listOfNotNull( ActionItem( diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/library/settings/LibraryFilters.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/library/settings/LibraryFilters.kt index 4e5452d2..79c8af05 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/library/settings/LibraryFilters.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/library/settings/LibraryFilters.kt @@ -28,7 +28,7 @@ fun getLibraryFilters(vm: LibrarySettingsViewModel): @Composable () -> Unit = re completed = vm.filterCompleted.collectAsState().value, setDownloadedFilter = { vm.filterDownloaded.value = it }, setUnreadFilter = { vm.filterUnread.value = it }, - setCompletedFilter = { vm.filterCompleted.value = it }, + setCompletedFilter = { vm.filterCompleted.value = it } ) } } @@ -40,7 +40,7 @@ fun LibraryFilters( completed: FilterState, setDownloadedFilter: (FilterState) -> Unit, setUnreadFilter: (FilterState) -> Unit, - setCompletedFilter: (FilterState) -> Unit, + setCompletedFilter: (FilterState) -> Unit ) { Column(Modifier.fillMaxWidth()) { Filter( diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/library/settings/LibrarySideMenu.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/library/settings/LibrarySideMenu.kt index e3460ca9..bd456e08 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/library/settings/LibrarySideMenu.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/library/settings/LibrarySideMenu.kt @@ -33,7 +33,7 @@ import ca.gosyer.jui.uicore.resources.stringResource fun LibrarySideMenu( libraryFilters: @Composable () -> Unit, librarySort: @Composable () -> Unit, - libraryDisplay: @Composable () -> Unit, + libraryDisplay: @Composable () -> Unit ) { Surface(Modifier.fillMaxHeight().width(260.dp), elevation = 1.dp) { Box { diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/main/MainMenu.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/main/MainMenu.kt index 356ce854..35825ea6 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/main/MainMenu.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/main/MainMenu.kt @@ -89,7 +89,7 @@ fun SkinnyMainMenu( AnimatedVisibility( navigator.size <= 1, enter = slideInVertically(initialOffsetY = { it }), - exit = slideOutVertically(targetOffsetY = { it }), + exit = slideOutVertically(targetOffsetY = { it }) ) { BottomNav(navigator) } diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/main/about/licenses/components/LicensesContent.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/main/about/licenses/components/LicensesContent.kt index 7addd485..b66bfb0a 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/main/about/licenses/components/LicensesContent.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/main/about/licenses/components/LicensesContent.kt @@ -45,7 +45,7 @@ internal expect fun InternalAboutLibraries( showLicenseBadges: Boolean, colors: LibraryColors, itemContentPadding: PaddingValues, - onLibraryClick: ((Library) -> Unit)?, + onLibraryClick: ((Library) -> Unit)? ) @Composable @@ -59,7 +59,7 @@ fun AboutLibraries( showLicenseBadges: Boolean = true, colors: LibraryColors = LibraryDefaults.libraryColors(), itemContentPadding: PaddingValues = LibraryDefaults.ContentPadding, - onLibraryClick: ((Library) -> Unit)? = null, + onLibraryClick: ((Library) -> Unit)? = null ) { InternalAboutLibraries( libraries = libraries, diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/main/components/SideMenu.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/main/components/SideMenu.kt index 4695567e..178cfa4e 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/main/components/SideMenu.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/main/components/SideMenu.kt @@ -66,7 +66,7 @@ fun SideMenu(modifier: Modifier, controller: DisplayController, navigator: Navig remember { MoreMenus.values() }.forEach { topLevelMenu -> SideMenuItem( topLevelMenu.isSelected(navigator), - topLevelMenu, + topLevelMenu ) { navigator replaceAll it } } } diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/main/components/SideMenuItem.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/main/components/SideMenuItem.kt index 6491e5a3..2777312e 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/main/components/SideMenuItem.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/main/components/SideMenuItem.kt @@ -70,7 +70,7 @@ private fun SideMenuItem( onClick = { if (selected) return@clickable onClick(createScreen()) - }, + } // onMiddleClick = { onMiddleClick?.invoke() } todo ) ) { diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/manga/MangaScreenViewModel.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/manga/MangaScreenViewModel.kt index c49d1fe9..fa2838ed 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/manga/MangaScreenViewModel.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/manga/MangaScreenViewModel.kt @@ -62,7 +62,7 @@ class MangaScreenViewModel @Inject constructor( private val removeMangaFromLibrary: RemoveMangaFromLibrary, uiPreferences: UiPreferences, contextWrapper: ContextWrapper, - private val params: Params, + private val params: Params ) : ViewModel(contextWrapper) { private val _manga = MutableStateFlow(null) val manga = _manga.asStateFlow() diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/manga/components/MangaMenu.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/manga/components/MangaMenu.kt index 2369b515..92d86148 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/manga/components/MangaMenu.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/manga/components/MangaMenu.kt @@ -82,7 +82,7 @@ private fun Cover(manga: Manga, modifier: Modifier = Modifier) { .aspectRatio( ratio = mangaAspectRatio, matchHeightConstraintsFirst = true - ), + ) ) } @@ -171,7 +171,7 @@ fun CategorySelectDialog( positiveButton(stringResource(MR.strings.action_ok)) negativeButton(stringResource(MR.strings.action_cancel)) }, - properties = getMaterialDialogProperties(), + properties = getMaterialDialogProperties() ) { title(stringResource(MR.strings.select_categories)) diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/reader/ReaderMenu.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/reader/ReaderMenu.kt index 0ab591bb..6340b958 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/reader/ReaderMenu.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/reader/ReaderMenu.kt @@ -254,7 +254,7 @@ fun WideReaderMenu( setSideMenuOpen: (Boolean) -> Unit, setMangaReaderMode: (String) -> Unit, movePrevChapter: () -> Unit, - moveNextChapter: () -> Unit, + moveNextChapter: () -> Unit ) { val sideMenuSize by animateDpAsState( targetValue = if (sideMenuOpen) { @@ -305,7 +305,7 @@ fun WideReaderMenu( pageEmitter = pageEmitter, retry = retry, progress = progress, - updateLastPageReadOffset = updateLastPageReadOffset, + updateLastPageReadOffset = updateLastPageReadOffset ) SideMenuButton(sideMenuOpen, onOpenSideMenuClicked = { setSideMenuOpen(true) }) } @@ -355,7 +355,7 @@ fun ThinReaderMenu( ReaderSheet( readerModes = readerModes, selectedMode = readerMode, - onSetReaderMode = setMangaReaderMode, + onSetReaderMode = setMangaReaderMode ) } ) { @@ -378,7 +378,7 @@ fun ThinReaderMenu( pageEmitter = pageEmitter, retry = retry, progress = progress, - updateLastPageReadOffset = updateLastPageReadOffset, + updateLastPageReadOffset = updateLastPageReadOffset ) AnimatedVisibility( readerMenuOpen, @@ -440,7 +440,7 @@ fun ReaderLayout( pageEmitter: SharedFlow, retry: (ReaderPage) -> Unit, progress: (Int) -> Unit, - updateLastPageReadOffset: (Int) -> Unit, + updateLastPageReadOffset: (Int) -> Unit ) { val loadingModifier = Modifier.fillMaxWidth().aspectRatio(mangaAspectRatio) val readerModifier = Modifier diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/reader/ReaderMenuViewModel.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/reader/ReaderMenuViewModel.kt index 2d84e5b6..8d403b6d 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/reader/ReaderMenuViewModel.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/reader/ReaderMenuViewModel.kt @@ -63,7 +63,7 @@ class ReaderMenuViewModel @Inject constructor( private val updateMangaMeta: UpdateMangaMeta, private val updateChapterMeta: UpdateChapterMeta, contextWrapper: ContextWrapper, - private val params: Params, + private val params: Params ) : ViewModel(contextWrapper) { override val scope = MainScope() private val _manga = MutableStateFlow(null) diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/reader/ReaderSideMenu.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/reader/ReaderSideMenu.kt index c2abb8bd..c41111bd 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/reader/ReaderSideMenu.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/reader/ReaderSideMenu.kt @@ -107,7 +107,7 @@ fun ReaderExpandBottomMenu( navigate: (Int) -> Unit, readerMenuOpen: Boolean, movePrevChapter: () -> Unit, - moveNextChapter: () -> Unit, + moveNextChapter: () -> Unit ) { AnimatedVisibility( readerMenuOpen, @@ -160,7 +160,7 @@ fun ReaderExpandBottomMenu( Card( modifier = Modifier.fillMaxSize().padding(it).padding(horizontal = 8.dp), shape = CircleShape, - backgroundColor = MaterialTheme.colors.surface.copy(alpha = 0.5F), + backgroundColor = MaterialTheme.colors.surface.copy(alpha = 0.5F) ) { AroundLayout( Modifier.padding(horizontal = 8.dp), @@ -204,7 +204,7 @@ fun ReaderExpandBottomMenu( fun ReaderSheet( readerModes: List, selectedMode: String, - onSetReaderMode: (String) -> Unit, + onSetReaderMode: (String) -> Unit ) { Column(Modifier.fillMaxWidth()) { ReaderModeSetting(readerModes, selectedMode, onSetReaderMode) @@ -282,7 +282,7 @@ private fun ReaderProgressSlider( @Composable private fun NavigateChapters(loadPrevChapter: () -> Unit, loadNextChapter: () -> Unit) { Divider(Modifier.padding(horizontal = 4.dp, vertical = 8.dp)) - Row(horizontalArrangement = Arrangement.SpaceBetween,) { + Row(horizontalArrangement = Arrangement.SpaceBetween) { OutlinedButton(loadPrevChapter, Modifier.weight(0.5F)) { Row(verticalAlignment = Alignment.CenterVertically) { val nextChapter = stringResource(MR.strings.nav_prev_chapter) diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/reader/loader/PageLoader.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/reader/loader/PageLoader.kt index efe4ee9d..851303e5 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/reader/loader/PageLoader.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/reader/loader/PageLoader.kt @@ -51,4 +51,4 @@ sealed class PagesState { object Loading : PagesState() data class Success(val pages: List) : PagesState() object Empty : PagesState() -} \ No newline at end of file +} diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/reader/navigation/EdgeNavigation.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/reader/navigation/EdgeNavigation.kt index 255d1f68..d5a1eb99 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/reader/navigation/EdgeNavigation.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/reader/navigation/EdgeNavigation.kt @@ -32,6 +32,6 @@ class EdgeNavigation : ViewerNavigation() { Region( rect = Rect(66, 0, 100, 100), type = Navigation.NEXT - ), + ) ) } diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/reader/navigation/NavigationClickable.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/reader/navigation/NavigationClickable.kt index 64a542b2..95ff859a 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/reader/navigation/NavigationClickable.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/reader/navigation/NavigationClickable.kt @@ -26,7 +26,7 @@ import kotlinx.coroutines.flow.MutableStateFlow fun Modifier.navigationClickable( navigation: ViewerNavigation, - onClick: (Navigation) -> Unit = {}, + onClick: (Navigation) -> Unit = {} ) = composed( inspectorInfo = debugInspectorInfo { name = "navigationClickable" @@ -37,7 +37,7 @@ fun Modifier.navigationClickable( navigationClickable( navigation = navigation, interactionSource = remember { MutableInteractionSource() }, - onClick = onClick, + onClick = onClick ) } diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/reader/viewer/Pager.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/reader/viewer/Pager.kt index bf89f0f7..2a8e873c 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/reader/viewer/Pager.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/reader/viewer/Pager.kt @@ -125,7 +125,7 @@ fun HandlePager( nextChapter: ReaderChapter?, loadingModifier: Modifier, pageContentScale: ContentScale, - retry: (Int) -> Unit, + retry: (Int) -> Unit ) { when (page) { 0 -> ChapterSeparator(previousChapter, currentChapter) diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/settings/SettingsBackupScreen.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/settings/SettingsBackupScreen.kt index 8a890336..4ecda266 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/settings/SettingsBackupScreen.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/settings/SettingsBackupScreen.kt @@ -342,7 +342,7 @@ private fun MissingSourcesDialog( positiveButton(stringResource(MR.strings.action_ok), onClick = onPositiveClick) negativeButton(stringResource(MR.strings.action_cancel), onClick = onNegativeClick) }, - properties = getMaterialDialogProperties(), + properties = getMaterialDialogProperties() ) { title(stringResource(MR.strings.missing_sources)) Box { diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/settings/SettingsGeneralScreen.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/settings/SettingsGeneralScreen.kt index 70f1433e..fc7ee9f2 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/settings/SettingsGeneralScreen.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/settings/SettingsGeneralScreen.kt @@ -161,7 +161,7 @@ fun SettingsGeneralScreenContent( ChoicePreference( preference = language, title = stringResource(MR.strings.language), - choices = languageChoices, + choices = languageChoices ) } item { diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/browse/components/SourceMangaBadges.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/browse/components/SourceMangaBadges.kt index c0ebfeeb..d14f2085 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/browse/components/SourceMangaBadges.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/browse/components/SourceMangaBadges.kt @@ -21,7 +21,7 @@ import ca.gosyer.jui.uicore.resources.stringResource @Composable fun SourceMangaBadges( inLibrary: Boolean, - modifier: Modifier = Modifier, + modifier: Modifier = Modifier ) { if (!inLibrary) return diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/browse/components/SourceMangaComfortableGrid.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/browse/components/SourceMangaComfortableGrid.kt index 8f900b1f..5cdcf4b1 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/browse/components/SourceMangaComfortableGrid.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/browse/components/SourceMangaComfortableGrid.kt @@ -47,7 +47,7 @@ fun SourceMangaComfortableGrid( gridSize: Int, onClickManga: (Long) -> Unit, hasNextPage: Boolean = false, - onLoadNextPage: () -> Unit, + onLoadNextPage: () -> Unit ) { Box { val state = rememberLazyGridState() diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/browse/components/SourceMangaCompactGrid.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/browse/components/SourceMangaCompactGrid.kt index 911ab08a..97a24c6e 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/browse/components/SourceMangaCompactGrid.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/browse/components/SourceMangaCompactGrid.kt @@ -50,7 +50,7 @@ fun SourceMangaCompactGrid( gridSize: Int, onClickManga: (Long) -> Unit, hasNextPage: Boolean = false, - onLoadNextPage: () -> Unit, + onLoadNextPage: () -> Unit ) { Box { val state = rememberLazyGridState() diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/browse/components/SourceMangaList.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/browse/components/SourceMangaList.kt index 45c33455..03f61568 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/browse/components/SourceMangaList.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/browse/components/SourceMangaList.kt @@ -38,7 +38,7 @@ fun SourceMangaList( mangas: List, onClickManga: (Long) -> Unit, hasNextPage: Boolean = false, - onLoadNextPage: () -> Unit, + onLoadNextPage: () -> Unit ) { Box { val state = rememberLazyListState() @@ -78,7 +78,7 @@ private fun MangaListItem( MangaListItem( modifier = modifier then Modifier .requiredHeight(56.dp) - .padding(horizontal = 16.dp), + .padding(horizontal = 16.dp) ) { MangaListItemImage( modifier = Modifier @@ -91,7 +91,7 @@ private fun MangaListItem( modifier = Modifier .weight(1f) .padding(horizontal = 16.dp), - text = manga.title, + text = manga.title ) SourceMangaBadges(inLibrary) } diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/browse/components/SourceScreenContent.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/browse/components/SourceScreenContent.kt index de618b73..a3ee364c 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/browse/components/SourceScreenContent.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/browse/components/SourceScreenContent.kt @@ -202,7 +202,7 @@ private fun SourceWideScreenContent( onToggleFiltersClick = setShowingFilters, onSelectDisplayMode = onSelectDisplayMode ) - }, + } ) { padding -> Box(Modifier.padding(padding)) { MangaTable( @@ -213,7 +213,7 @@ private fun SourceWideScreenContent( isLoading = loading, hasNextPage = hasNextPage, onLoadNextPage = loadNextPage, - onMangaClick = onMangaClick, + onMangaClick = onMangaClick ) if (showingFilters && !isLatest) { Box( @@ -337,7 +337,7 @@ private fun SourceThinScreenContent( isLoading = loading, hasNextPage = hasNextPage, onLoadNextPage = loadNextPage, - onMangaClick = onMangaClick, + onMangaClick = onMangaClick ) if (showingFilters && !isLatest) { Box( @@ -387,7 +387,7 @@ fun SourceToolbar( showingFilters: Boolean, onClickMode: (Boolean) -> Unit, onToggleFiltersClick: (Boolean) -> Unit, - onSelectDisplayMode: (DisplayMode) -> Unit, + onSelectDisplayMode: (DisplayMode) -> Unit ) { Toolbar( source.name, @@ -458,7 +458,7 @@ private fun MangaTable( isLoading: Boolean = false, hasNextPage: Boolean = false, onLoadNextPage: () -> Unit, - onMangaClick: (Long) -> Unit, + onMangaClick: (Long) -> Unit ) { if (isLoading || mangas.isEmpty()) { LoadingScreen(isLoading) @@ -540,6 +540,6 @@ private fun getActionItems( icon = Icons.Rounded.Settings, doAction = onSourceSettingsClick ) - } else null, + } else null ) } diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/browse/filter/SourceFiltersMenu.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/browse/filter/SourceFiltersMenu.kt index f255fcc7..fb1ceabb 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/browse/filter/SourceFiltersMenu.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/browse/filter/SourceFiltersMenu.kt @@ -154,7 +154,7 @@ fun SourceFilterAction( text = name, overflow = TextOverflow.Ellipsis, maxLines = 1, - style = MaterialTheme.typography.subtitle1, + style = MaterialTheme.typography.subtitle1 ) } } @@ -196,7 +196,7 @@ fun HeaderView(header: SourceFiltersView.Header) { fontWeight = FontWeight.Bold, color = LocalContentColor.current.copy(alpha = ContentAlpha.disabled), maxLines = 1, - style = MaterialTheme.typography.subtitle1, + style = MaterialTheme.typography.subtitle1 ) } } diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/browse/filter/SourceFiltersViewModel.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/browse/filter/SourceFiltersViewModel.kt index 0c926205..f3f1ab5f 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/browse/filter/SourceFiltersViewModel.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/browse/filter/SourceFiltersViewModel.kt @@ -32,7 +32,7 @@ class SourceFiltersViewModel( @Inject constructor( sourceHandler: SourceRepositoryImpl, contextWrapper: ContextWrapper, - params: Params, + params: Params ) : this( params.sourceId, sourceHandler, diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/browse/filter/model/SourceFiltersView.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/browse/filter/model/SourceFiltersView.kt index c64f98bf..da1582ff 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/browse/filter/model/SourceFiltersView.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/browse/filter/model/SourceFiltersView.kt @@ -145,7 +145,7 @@ sealed class SourceFiltersView { data class Group internal constructor( override val index: Int, override val name: String, - override val filter: GroupFilter.GroupProps, + override val filter: GroupFilter.GroupProps ) : SourceFiltersView>>() { override val state: StateFlow>> = MutableStateFlow( filter.state.mapIndexed { itemIndex, sourceFilter -> diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/components/SourcesMenu.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/components/SourcesMenu.kt index 6e2d4322..f119d8a6 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/components/SourcesMenu.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/components/SourcesMenu.kt @@ -55,7 +55,7 @@ fun SourcesMenu() { BoxWithConstraints { if (maxWidth > 720.dp) { SourcesNavigator( - homeScreen, + homeScreen ) { navigator -> Row { SourcesSideMenu( diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/settings/components/SourceSettingsScreenContent.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/settings/components/SourceSettingsScreenContent.kt index 09f2621a..1c2ad258 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/settings/components/SourceSettingsScreenContent.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/sources/settings/components/SourceSettingsScreenContent.kt @@ -193,7 +193,7 @@ private fun EditTextPreference(editText: EditText) { positiveButton(stringResource(MR.strings.action_ok)) negativeButton(stringResource(MR.strings.action_cancel)) }, - properties = getMaterialDialogProperties(), + properties = getMaterialDialogProperties() ) { title(editText.dialogTitle ?: BuildKonfig.NAME) if (editText.dialogMessage != null) { diff --git a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/updates/components/UpdatesScreenContent.kt b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/updates/components/UpdatesScreenContent.kt index 4dfdb149..a4e00c36 100644 --- a/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/updates/components/UpdatesScreenContent.kt +++ b/presentation/src/commonMain/kotlin/ca/gosyer/jui/ui/updates/components/UpdatesScreenContent.kt @@ -159,7 +159,7 @@ fun UpdatesItem( chapterDownloadItem, onClickDownload, onClickStopDownload, - onClickDeleteDownload, + onClickDeleteDownload ) } } diff --git a/presentation/src/desktopMain/kotlin/ca/gosyer/jui/ui/base/file/DesktopFileSaver.kt b/presentation/src/desktopMain/kotlin/ca/gosyer/jui/ui/base/file/DesktopFileSaver.kt index 16a6624b..cf002183 100644 --- a/presentation/src/desktopMain/kotlin/ca/gosyer/jui/ui/base/file/DesktopFileSaver.kt +++ b/presentation/src/desktopMain/kotlin/ca/gosyer/jui/ui/base/file/DesktopFileSaver.kt @@ -43,7 +43,7 @@ actual class FileSaver( actual fun rememberFileSaver( onFileSelected: (Sink) -> Unit, onCancel: () -> Unit, - onError: () -> Unit, + onError: () -> Unit ): FileSaver { val coroutineScope = rememberCoroutineScope() return remember { FileSaver(onFileSelected, onCancel, onError, coroutineScope) } diff --git a/presentation/src/desktopMain/kotlin/ca/gosyer/jui/ui/library/components/DesktopLibraryGrid.kt b/presentation/src/desktopMain/kotlin/ca/gosyer/jui/ui/library/components/DesktopLibraryGrid.kt index 016a1bf3..dde51151 100644 --- a/presentation/src/desktopMain/kotlin/ca/gosyer/jui/ui/library/components/DesktopLibraryGrid.kt +++ b/presentation/src/desktopMain/kotlin/ca/gosyer/jui/ui/library/components/DesktopLibraryGrid.kt @@ -30,6 +30,6 @@ private fun getContextItems( onClickRemoveManga: () -> Unit ): List { return listOf( - ContextMenuItem(stringResource(MR.strings.action_remove_favorite)) { onClickRemoveManga() }, + ContextMenuItem(stringResource(MR.strings.action_remove_favorite)) { onClickRemoveManga() } ) } diff --git a/presentation/src/desktopMain/kotlin/ca/gosyer/jui/ui/main/about/licenses/components/DesktopLicenses.kt b/presentation/src/desktopMain/kotlin/ca/gosyer/jui/ui/main/about/licenses/components/DesktopLicenses.kt index a9e8bce6..9db80f98 100644 --- a/presentation/src/desktopMain/kotlin/ca/gosyer/jui/ui/main/about/licenses/components/DesktopLicenses.kt +++ b/presentation/src/desktopMain/kotlin/ca/gosyer/jui/ui/main/about/licenses/components/DesktopLicenses.kt @@ -43,7 +43,7 @@ actual fun InternalAboutLibraries( showLicenseBadges: Boolean, colors: LibraryColors, itemContentPadding: PaddingValues, - onLibraryClick: ((Library) -> Unit)?, + onLibraryClick: ((Library) -> Unit)? ) { Libraries( libraries = libraries, diff --git a/presentation/src/desktopMain/kotlin/ca/gosyer/jui/ui/settings/DesktopSettingsServerScreen.kt b/presentation/src/desktopMain/kotlin/ca/gosyer/jui/ui/settings/DesktopSettingsServerScreen.kt index 648f3d9a..2d715721 100644 --- a/presentation/src/desktopMain/kotlin/ca/gosyer/jui/ui/settings/DesktopSettingsServerScreen.kt +++ b/presentation/src/desktopMain/kotlin/ca/gosyer/jui/ui/settings/DesktopSettingsServerScreen.kt @@ -66,7 +66,7 @@ actual fun getServerHostItems(viewModel: @Composable () -> SettingsServerHostVie openInBrowserEnabled = serverVm.openInBrowserEnabled, basicAuthEnabled = serverVm.basicAuthEnabled, basicAuthUsername = serverVm.basicAuthUsername, - basicAuthPassword = serverVm.basicAuthPassword, + basicAuthPassword = serverVm.basicAuthPassword ) } } @@ -149,7 +149,7 @@ fun LazyListScope.ServerHostItems( openInBrowserEnabled: PreferenceMutableStateFlow, basicAuthEnabled: PreferenceMutableStateFlow, basicAuthUsername: PreferenceMutableStateFlow, - basicAuthPassword: PreferenceMutableStateFlow, + basicAuthPassword: PreferenceMutableStateFlow ) { item { SwitchPreference(preference = host, title = stringResource(MR.strings.host_server)) diff --git a/presentation/src/desktopMain/kotlin/ca/gosyer/jui/ui/util/system/File.kt b/presentation/src/desktopMain/kotlin/ca/gosyer/jui/ui/util/system/File.kt index 7218f3f1..42ff3606 100644 --- a/presentation/src/desktopMain/kotlin/ca/gosyer/jui/ui/util/system/File.kt +++ b/presentation/src/desktopMain/kotlin/ca/gosyer/jui/ui/util/system/File.kt @@ -77,7 +77,7 @@ private fun fileChooser( onError: () -> Unit = {}, onApprove: (Path) -> Unit, defaultFileName: String = "", - vararg extensions: String, + vararg extensions: String ) = launchUI { val fileChooser = JFileChooser() .apply { diff --git a/ui-core/src/androidMain/kotlin/ca/gosyer/jui/uicore/components/AndroidScrollbar.kt b/ui-core/src/androidMain/kotlin/ca/gosyer/jui/uicore/components/AndroidScrollbar.kt index e46521d8..638732d6 100644 --- a/ui-core/src/androidMain/kotlin/ca/gosyer/jui/uicore/components/AndroidScrollbar.kt +++ b/ui-core/src/androidMain/kotlin/ca/gosyer/jui/uicore/components/AndroidScrollbar.kt @@ -114,7 +114,7 @@ actual fun rememberScrollbarAdapter( @Composable actual fun rememberScrollbarAdapter( - scrollState: LazyListState, + scrollState: LazyListState ): ScrollbarAdapter { return remember(scrollState) { LazyListStateScrollbarAdapter(scrollState) @@ -124,7 +124,7 @@ actual fun rememberScrollbarAdapter( @Composable actual fun rememberScrollbarAdapter( scrollState: LazyGridState, - gridCells: GridCells, + gridCells: GridCells ): ScrollbarAdapter { return remember(scrollState, gridCells) { LazyGridStateScrollbarAdapter(scrollState, gridCells) @@ -171,7 +171,9 @@ private fun Modifier.drawScrollbar( orientation: Orientation, reverseScrolling: Boolean ): Modifier = drawScrollbar( - orientation, reverseScrolling, snapshotFlow { state.isScrollInProgress } + orientation, + reverseScrolling, + snapshotFlow { state.isScrollInProgress } ) { reverseDirection, atEnd, thickness, color, alpha -> val layoutInfo = state.layoutInfo val viewportSize = layoutInfo.viewportEndOffset - layoutInfo.viewportStartOffset @@ -210,7 +212,9 @@ private fun Modifier.drawScrollbar( orientation: Orientation, reverseScrolling: Boolean ): Modifier = drawScrollbar( - orientation, reverseScrolling, snapshotFlow { state.isScrollInProgress } + orientation, + reverseScrolling, + snapshotFlow { state.isScrollInProgress } ) { reverseDirection, atEnd, thickness, color, alpha -> val layoutInfo = state.layoutInfo val viewportSize = layoutInfo.viewportEndOffset - layoutInfo.viewportStartOffset @@ -328,5 +332,5 @@ private fun Modifier.drawScrollbar( private val Thickness = 4.dp private val FadeOutAnimationSpec = tween( - durationMillis = ViewConfiguration.getScrollBarFadeDuration(), + durationMillis = ViewConfiguration.getScrollBarFadeDuration() ) diff --git a/ui-core/src/commonMain/kotlin/ca/gosyer/jui/uicore/components/KeyboardHandler.kt b/ui-core/src/commonMain/kotlin/ca/gosyer/jui/uicore/components/KeyboardHandler.kt index 15be1234..c6172657 100644 --- a/ui-core/src/commonMain/kotlin/ca/gosyer/jui/uicore/components/KeyboardHandler.kt +++ b/ui-core/src/commonMain/kotlin/ca/gosyer/jui/uicore/components/KeyboardHandler.kt @@ -19,7 +19,7 @@ import androidx.compose.ui.platform.LocalFocusManager fun Modifier.keyboardHandler( singleLine: Boolean = false, enterAction: ((FocusManager) -> Unit)? = null, - action: (FocusManager) -> Unit = { it.moveFocus(FocusDirection.Down) }, + action: (FocusManager) -> Unit = { it.moveFocus(FocusDirection.Down) } ) = composed { val focusManager = LocalFocusManager.current Modifier.onPreviewKeyEvent { diff --git a/ui-core/src/commonMain/kotlin/ca/gosyer/jui/uicore/components/Manga.kt b/ui-core/src/commonMain/kotlin/ca/gosyer/jui/uicore/components/Manga.kt index c12f47cd..36130cdc 100644 --- a/ui-core/src/commonMain/kotlin/ca/gosyer/jui/uicore/components/Manga.kt +++ b/ui-core/src/commonMain/kotlin/ca/gosyer/jui/uicore/components/Manga.kt @@ -37,7 +37,7 @@ import io.kamel.core.Resource fun MangaGridItem( title: String, cover: Resource, - onClick: () -> Unit = {}, + onClick: () -> Unit = {} ) { val fontStyle = LocalTextStyle.current.merge( TextStyle(letterSpacing = 0.sp, fontFamily = FontFamily.SansSerif, fontSize = 14.sp) @@ -63,7 +63,7 @@ fun MangaGridItem( overflow = TextOverflow.Ellipsis, modifier = Modifier.wrapContentHeight(Alignment.CenterVertically) .align(Alignment.BottomStart) - .padding(8.dp), + .padding(8.dp) ) } } diff --git a/ui-core/src/commonMain/kotlin/ca/gosyer/jui/uicore/components/Scrollbar.kt b/ui-core/src/commonMain/kotlin/ca/gosyer/jui/uicore/components/Scrollbar.kt index b406e62d..819fe300 100644 --- a/ui-core/src/commonMain/kotlin/ca/gosyer/jui/uicore/components/Scrollbar.kt +++ b/ui-core/src/commonMain/kotlin/ca/gosyer/jui/uicore/components/Scrollbar.kt @@ -28,7 +28,7 @@ internal expect fun RealVerticalScrollbar( modifier: Modifier, reverseLayout: Boolean, style: ScrollbarStyle, - interactionSource: MutableInteractionSource, + interactionSource: MutableInteractionSource ) @Composable @@ -37,7 +37,7 @@ internal expect fun RealHorizontalScrollbar( modifier: Modifier, reverseLayout: Boolean, style: ScrollbarStyle, - interactionSource: MutableInteractionSource, + interactionSource: MutableInteractionSource ) @Composable @@ -65,13 +65,13 @@ expect fun rememberScrollbarAdapter( @Composable expect fun rememberScrollbarAdapter( - scrollState: LazyListState, + scrollState: LazyListState ): ScrollbarAdapter @Composable expect fun rememberScrollbarAdapter( scrollState: LazyGridState, - gridCells: GridCells, + gridCells: GridCells ): ScrollbarAdapter expect fun Modifier.scrollbarPadding(): Modifier diff --git a/ui-core/src/commonMain/kotlin/ca/gosyer/jui/uicore/theme/Themes.kt b/ui-core/src/commonMain/kotlin/ca/gosyer/jui/uicore/theme/Themes.kt index 06582683..7f0c65dd 100644 --- a/ui-core/src/commonMain/kotlin/ca/gosyer/jui/uicore/theme/Themes.kt +++ b/ui-core/src/commonMain/kotlin/ca/gosyer/jui/uicore/theme/Themes.kt @@ -47,5 +47,5 @@ val themes = listOf( onPrimary = Color.White, background = Color.Black ) - ), + ) ) diff --git a/ui-core/src/desktopMain/kotlin/ca/gosyer/jui/uicore/components/DesktopScrollbar.kt b/ui-core/src/desktopMain/kotlin/ca/gosyer/jui/uicore/components/DesktopScrollbar.kt index ec994a49..7ade9c8e 100644 --- a/ui-core/src/desktopMain/kotlin/ca/gosyer/jui/uicore/components/DesktopScrollbar.kt +++ b/ui-core/src/desktopMain/kotlin/ca/gosyer/jui/uicore/components/DesktopScrollbar.kt @@ -39,7 +39,11 @@ internal actual fun RealVerticalScrollbar( style: ScrollbarStyle, interactionSource: MutableInteractionSource ) = androidx.compose.foundation.VerticalScrollbar( - adapter, modifier, reverseLayout, style, interactionSource + adapter, + modifier, + reverseLayout, + style, + interactionSource ) @Composable @@ -50,7 +54,11 @@ internal actual fun RealHorizontalScrollbar( style: ScrollbarStyle, interactionSource: MutableInteractionSource ) = androidx.compose.foundation.HorizontalScrollbar( - adapter, modifier, reverseLayout, style, interactionSource + adapter, + modifier, + reverseLayout, + style, + interactionSource ) @Composable @@ -62,7 +70,7 @@ actual fun rememberScrollbarAdapter( @Composable actual fun rememberScrollbarAdapter( - scrollState: LazyListState, + scrollState: LazyListState ): ScrollbarAdapter { return androidx.compose.foundation.rememberScrollbarAdapter(scrollState) } @@ -70,7 +78,7 @@ actual fun rememberScrollbarAdapter( @Composable actual fun rememberScrollbarAdapter( scrollState: LazyGridState, - gridCells: GridCells, + gridCells: GridCells ): ScrollbarAdapter { val density = LocalDensity.current return remember(scrollState, gridCells, density) { GridScrollbarAdapter(scrollState, gridCells, density) } @@ -80,12 +88,11 @@ actual fun rememberScrollbarAdapter( class GridScrollbarAdapter( private val scrollState: LazyGridState, private val gridCells: GridCells, - private val density: Density, + private val density: Density ) : ScrollbarAdapter { override val scrollOffset: Float get() = (scrollState.firstVisibleItemIndex / itemsPerRow).coerceAtLeast(0) * averageItemSize + scrollState.firstVisibleItemScrollOffset - override fun maxScrollOffset(containerSize: Int): Float { val size = with(gridCells) { density.calculateCrossAxisCellSizes(containerSize, 0).size @@ -93,7 +100,6 @@ class GridScrollbarAdapter( return (averageItemSize * (itemCount / size) - containerSize).coerceAtLeast(0f) } - override suspend fun scrollTo(containerSize: Int, scrollOffset: Float) { val distance = scrollOffset - this@GridScrollbarAdapter.scrollOffset