diff --git a/app/src/main/java/eu/kanade/tachiyomi/source/online/merged/toonily/Toonily.kt b/app/src/main/java/eu/kanade/tachiyomi/source/online/merged/toonily/Toonily.kt index 506797f1a7..f9b1150273 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/source/online/merged/toonily/Toonily.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/source/online/merged/toonily/Toonily.kt @@ -52,7 +52,7 @@ class Toonily : ReducedHttpSource() { } } - protected open val userAgentRandomizer = " ${Random.nextInt().absoluteValue}" + val userAgentRandomizer = " ${Random.nextInt().absoluteValue}" override val client: OkHttpClient = network.cloudFlareClient @@ -99,7 +99,7 @@ class Toonily : ReducedHttpSource() { return parseSearchManga(response) } - open fun searchFormBuilder(query: String): FormBody.Builder = + fun searchFormBuilder(query: String): FormBody.Builder = FormBody.Builder().apply { add("action", "madara_load_more") add("page", "0") diff --git a/app/src/main/java/eu/kanade/tachiyomi/source/online/merged/weebcentral/WeebCentral.kt b/app/src/main/java/eu/kanade/tachiyomi/source/online/merged/weebcentral/WeebCentral.kt index 59a5d33ae7..e4e7a5c7a1 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/source/online/merged/weebcentral/WeebCentral.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/source/online/merged/weebcentral/WeebCentral.kt @@ -202,7 +202,7 @@ class WeebCentral : ReducedHttpSource() { return try { when (this == null) { true -> 0L - false -> dateFormat.parse(this).time + false -> dateFormat.parse(this)!!.time } } catch (_: ParseException) { 0L diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsDataController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsDataController.kt index c9352eb09b..4b18f89001 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsDataController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsDataController.kt @@ -150,22 +150,21 @@ class SettingsDataController : SettingsController() { } when (requestCode) { - STORAGE_DIR -> - if (data != null && resultCode == Activity.RESULT_OK) { - val context = applicationContext ?: return - val uri = data.data - val flags = - Intent.FLAG_GRANT_READ_URI_PERMISSION or - Intent.FLAG_GRANT_WRITE_URI_PERMISSION - - if (uri != null) { - context.contentResolver.takePersistableUriPermission(uri, flags) - } - - val file = UniFile.fromUri(context, uri)!! + STORAGE_DIR -> { + val context = applicationContext ?: return + val uri = data.data + val flags = + Intent.FLAG_GRANT_READ_URI_PERMISSION or + Intent.FLAG_GRANT_WRITE_URI_PERMISSION - storagePreferences.baseStorageDirectory().set(file.uri.toString()) + if (uri != null) { + context.contentResolver.takePersistableUriPermission(uri, flags) } + + val file = UniFile.fromUri(context, uri)!! + + storagePreferences.baseStorageDirectory().set(file.uri.toString()) + } CODE_BACKUP_CREATE -> { val flags = Intent.FLAG_GRANT_READ_URI_PERMISSION or diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/storage/OkioExtensions.kt b/app/src/main/java/eu/kanade/tachiyomi/util/storage/OkioExtensions.kt index 0eac12d482..e9af1c1342 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/storage/OkioExtensions.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/storage/OkioExtensions.kt @@ -14,7 +14,7 @@ import okio.sink fun BufferedSource.saveTo(file: File) { try { // Create parent dirs if needed - file.parentFile.mkdirs() + file.parentFile!!.mkdirs() // Copy to destination saveTo(file.outputStream()) diff --git a/app/src/main/java/org/nekomanga/presentation/components/AppBarActions.kt b/app/src/main/java/org/nekomanga/presentation/components/AppBarActions.kt index f13ecd576b..5d33a11f5f 100644 --- a/app/src/main/java/org/nekomanga/presentation/components/AppBarActions.kt +++ b/app/src/main/java/org/nekomanga/presentation/components/AppBarActions.kt @@ -2,8 +2,8 @@ package org.nekomanga.presentation.components import ToolTipButton import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.automirrored.filled.ViewList import androidx.compose.material.icons.filled.MoreVert -import androidx.compose.material.icons.filled.ViewList import androidx.compose.material.icons.filled.ViewModule import androidx.compose.material.icons.filled.Visibility import androidx.compose.material.icons.filled.VisibilityOff @@ -36,7 +36,7 @@ fun listGridAppBarAction( false -> AppBar.Action( title = UiText.StringResource(resourceId = R.string.display_as_list), - icon = Icons.Filled.ViewList, + icon = Icons.AutoMirrored.Filled.ViewList, onClick = onClick, isEnabled = isEnabled, ) diff --git a/app/src/main/java/org/nekomanga/presentation/components/NekoScaffold.kt b/app/src/main/java/org/nekomanga/presentation/components/NekoScaffold.kt index d5bc7b3070..402a417987 100644 --- a/app/src/main/java/org/nekomanga/presentation/components/NekoScaffold.kt +++ b/app/src/main/java/org/nekomanga/presentation/components/NekoScaffold.kt @@ -20,7 +20,7 @@ import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.material.LocalContentAlpha import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.ArrowBack +import androidx.compose.material.icons.automirrored.filled.ArrowBack import androidx.compose.material.icons.filled.Close import androidx.compose.material.icons.filled.Search import androidx.compose.material.icons.filled.SearchOff @@ -84,7 +84,7 @@ fun NekoScaffold( isRoot: Boolean = false, scrollBehavior: TopAppBarScrollBehavior = TopAppBarDefaults.enterAlwaysScrollBehavior(state = rememberTopAppBarState()), - navigationIcon: ImageVector = Icons.Filled.ArrowBack, + navigationIcon: ImageVector = Icons.AutoMirrored.Filled.ArrowBack, navigationIconLabel: String = stringResource(id = R.string.back), onSearch: (String?) -> Unit = {}, snackBarHost: @Composable () -> Unit = {}, diff --git a/app/src/main/java/org/nekomanga/presentation/components/dropdown/MainDropdownMenu.kt b/app/src/main/java/org/nekomanga/presentation/components/dropdown/MainDropdownMenu.kt index a0ad2dfaf1..adcb9dd6e4 100644 --- a/app/src/main/java/org/nekomanga/presentation/components/dropdown/MainDropdownMenu.kt +++ b/app/src/main/java/org/nekomanga/presentation/components/dropdown/MainDropdownMenu.kt @@ -4,7 +4,7 @@ import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.size import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.outlined.HelpOutline +import androidx.compose.material.icons.automirrored.outlined.HelpOutline import androidx.compose.material.icons.outlined.Info import androidx.compose.material.icons.outlined.QueryStats import androidx.compose.material.icons.outlined.Settings @@ -102,7 +102,7 @@ fun MainDropdownMenu( ) Row( title = UiText.StringResource(R.string.help), - icon = UiIcon.Icon(Icons.Outlined.HelpOutline), + icon = UiIcon.Icon(Icons.AutoMirrored.Outlined.HelpOutline), onClick = helpClick, onDismiss = onDismiss, ) diff --git a/app/src/main/java/org/nekomanga/presentation/screens/browse/BrowseHomePage.kt b/app/src/main/java/org/nekomanga/presentation/screens/browse/BrowseHomePage.kt index 22a10ebddd..4368daa406 100644 --- a/app/src/main/java/org/nekomanga/presentation/screens/browse/BrowseHomePage.kt +++ b/app/src/main/java/org/nekomanga/presentation/screens/browse/BrowseHomePage.kt @@ -17,7 +17,7 @@ import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material.Icon import androidx.compose.material.Text import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.ArrowForward +import androidx.compose.material.icons.automirrored.filled.ArrowForward import androidx.compose.material3.MaterialTheme import androidx.compose.material3.TextButton import androidx.compose.runtime.Composable @@ -86,7 +86,7 @@ fun BrowseHomePage( ) Gap(Size.tiny) Icon( - imageVector = Icons.Default.ArrowForward, + imageVector = Icons.AutoMirrored.Default.ArrowForward, modifier = Modifier.size(24.dp), contentDescription = null, tint = MaterialTheme.colorScheme.onSurface, @@ -148,7 +148,7 @@ fun BrowseHomePage( ) Gap(Size.tiny) Icon( - imageVector = Icons.Default.ArrowForward, + imageVector = Icons.AutoMirrored.Default.ArrowForward, modifier = Modifier.size(24.dp), contentDescription = null, tint = MaterialTheme.colorScheme.onSurface, diff --git a/app/src/main/java/org/nekomanga/presentation/screens/mangadetails/InformationBlock.kt b/app/src/main/java/org/nekomanga/presentation/screens/mangadetails/InformationBlock.kt index 48f1aaba51..adb3c7310e 100644 --- a/app/src/main/java/org/nekomanga/presentation/screens/mangadetails/InformationBlock.kt +++ b/app/src/main/java/org/nekomanga/presentation/screens/mangadetails/InformationBlock.kt @@ -12,8 +12,8 @@ import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.automirrored.filled.Comment import androidx.compose.material.icons.filled.Bookmarks -import androidx.compose.material.icons.filled.Comment import androidx.compose.material.icons.filled.HotelClass import androidx.compose.material.icons.outlined._18UpRating import androidx.compose.material3.MaterialTheme @@ -245,7 +245,7 @@ fun InformationBlock( Gap(Size.tiny) Image( - imageVector = Icons.Filled.Comment, + imageVector = Icons.AutoMirrored.Filled.Comment, contentDescription = null, colorFilter = ColorFilter.tint(mediumAlpha), ) diff --git a/app/src/main/java/org/nekomanga/presentation/screens/stats/DetailedStats.kt b/app/src/main/java/org/nekomanga/presentation/screens/stats/DetailedStats.kt index c2d52d6666..4019fba4fe 100644 --- a/app/src/main/java/org/nekomanga/presentation/screens/stats/DetailedStats.kt +++ b/app/src/main/java/org/nekomanga/presentation/screens/stats/DetailedStats.kt @@ -20,7 +20,7 @@ import androidx.compose.foundation.lazy.grid.LazyVerticalGrid import androidx.compose.foundation.lazy.grid.items import androidx.compose.foundation.lazy.items import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Sort +import androidx.compose.material.icons.automirrored.filled.Sort import androidx.compose.material3.AssistChip import androidx.compose.material3.ElevatedCard import androidx.compose.material3.FilterChip @@ -656,7 +656,9 @@ private fun SortChip(sortType: Sort, onClick: () -> Unit) { AssistChip( onClick = onClick, label = { Text(text = stringResource(id = sortType.stringRes)) }, - trailingIcon = { Icon(imageVector = Icons.Default.Sort, contentDescription = null) }, + trailingIcon = { + Icon(imageVector = Icons.AutoMirrored.Default.Sort, contentDescription = null) + }, ) } }