Content-Length: 12434 | pFad | http://github.com/toastkidjp/Yobidashi_kt/commit/2fe53a44904c92a5ca3d127225f4bdb3403c60c5.patch

01 From ec0c809815dee39d71418121b054daed9f3982cb Mon Sep 17 00:00:00 2001 From: Toast Kid Date: Sun, 15 Dec 2024 10:45:26 +0900 Subject: [PATCH 1/9] bugfix #192 Fix incorrect permission usage. --- .../web/bookmark/view/BookmarkListUi.kt | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/web/src/main/java/jp/toastkid/web/bookmark/view/BookmarkListUi.kt b/web/src/main/java/jp/toastkid/web/bookmark/view/BookmarkListUi.kt index 4e07f9cf8..a93c49902 100644 --- a/web/src/main/java/jp/toastkid/web/bookmark/view/BookmarkListUi.kt +++ b/web/src/main/java/jp/toastkid/web/bookmark/view/BookmarkListUi.kt @@ -160,7 +160,7 @@ fun BookmarkListUi() { val importRequestPermissionLauncher = rememberLauncherForActivityResult(ActivityResultContracts.RequestPermission()) { - if (!it && Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) { + if (!it) { contentViewModel.snackShort(jp.toastkid.lib.R.string.message_requires_permission_storage) return@rememberLauncherForActivityResult } @@ -183,7 +183,7 @@ fun BookmarkListUi() { val exportRequestPermissionLauncher = rememberLauncherForActivityResult(ActivityResultContracts.RequestPermission()) { - if (!it && Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) { + if (!it) { contentViewModel.snackShort(jp.toastkid.lib.R.string.message_requires_permission_storage) return@rememberLauncherForActivityResult } @@ -261,10 +261,20 @@ fun BookmarkListUi() { openAddFolderDialogState.value = true }), OptionMenu(titleId = R.string.title_import_bookmark, action = { - importRequestPermissionLauncher.launch(Manifest.permission.WRITE_EXTERNAL_STORAGE) + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) { + importRequestPermissionLauncher.launch(Manifest.permission.READ_EXTERNAL_STORAGE) + return@OptionMenu + } + + getContentLauncher.launch(GetContentIntentFactory()("text/html")) }), OptionMenu(titleId = R.string.title_export_bookmark, action = { - exportRequestPermissionLauncher.launch(Manifest.permission.WRITE_EXTERNAL_STORAGE) + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) { + exportRequestPermissionLauncher.launch(Manifest.permission.WRITE_EXTERNAL_STORAGE) + return@OptionMenu + } + + exportLauncher.launch(CreateDocumentIntentFactory()("text/html", EXPORT_FILE_NAME)) }), OptionMenu(titleId = R.string.title_add_default_bookmark, action = { BookmarkInitializer.from(activityContext)() { viewModel.query(bookmarkRepository) } From 1eb6caf65c08aebd3147d4d20ceadedaa3d7772c Mon Sep 17 00:00:00 2001 From: Toast Kid Date: Sun, 15 Dec 2024 10:45:52 +0900 Subject: [PATCH 2/9] feature #580 Upgrade Room to 2.6.1. --- settings.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings.gradle.kts b/settings.gradle.kts index 256f40dc4..9b968c209 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -9,7 +9,7 @@ dependencyResolutionManagement { versionCatalogs { create("libraries") { version("kotlin", "2.0.20") - version("room", "2.5.0") + version("room", "2.6.1") plugin("composeCompiler", "org.jetbrains.kotlin.plugin.compose").version("2.0.21") library("activityCompose", "androidx.activity", "activity-compose").version("1.9.0") library("kotlinSerialization", "org.jetbrains.kotlinx", "kotlinx-serialization-json").version("1.6.0") From 13671b94c430a306edca756f9b71f8e0ea0ee881 Mon Sep 17 00:00:00 2001 From: Toast Kid Date: Sun, 15 Dec 2024 10:46:10 +0900 Subject: [PATCH 3/9] refactor #412 Specify version directly. --- api/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/build.gradle.kts b/api/build.gradle.kts index 54df68121..8223166a5 100644 --- a/api/build.gradle.kts +++ b/api/build.gradle.kts @@ -40,7 +40,7 @@ android { dependencies { implementation("androidx.core:core-ktx:${LibraryVersion.ktx}") - implementation("com.squareup.okhttp3:okhttp:${LibraryVersion.okhttp}") + implementation("com.squareup.okhttp3:okhttp:4.12.0") implementation("com.jakewharton.timber:timber:${LibraryVersion.timber}") implementation("com.squareup.retrofit2:retrofit:2.11.0") implementation(libraries.jsoup) From 48cb94a248a4ce52b719796fdd55bc29f523756f Mon Sep 17 00:00:00 2001 From: Toast Kid Date: Sun, 15 Dec 2024 10:46:27 +0900 Subject: [PATCH 4/9] refactor #853 Delete useless version. --- buildSrc/src/main/java/property/LibraryVersion.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/buildSrc/src/main/java/property/LibraryVersion.kt b/buildSrc/src/main/java/property/LibraryVersion.kt index bd947d174..1d2afc295 100644 --- a/buildSrc/src/main/java/property/LibraryVersion.kt +++ b/buildSrc/src/main/java/property/LibraryVersion.kt @@ -5,7 +5,6 @@ object LibraryVersion { val ktx = "1.1.0" val lifecycle = "2.8.5" val timber = "4.6.0" - val okhttp = "4.12.0" val exifinterface = "1.3.3" val composeCompiler = "1.4.6" val composeMaterial3 = "1.3.0" From 4f526e2760a141b3d2d57513fcd979f06fa6a53d Mon Sep 17 00:00:00 2001 From: Toast Kid Date: Sun, 15 Dec 2024 11:04:34 +0900 Subject: [PATCH 5/9] refactor #506 Delete useless class. --- .../factory/GifImageLoaderFactoryTest.kt | 67 ------------------- 1 file changed, 67 deletions(-) delete mode 100644 image/src/test/java/jp/toastkid/image/factory/GifImageLoaderFactoryTest.kt diff --git a/image/src/test/java/jp/toastkid/image/factory/GifImageLoaderFactoryTest.kt b/image/src/test/java/jp/toastkid/image/factory/GifImageLoaderFactoryTest.kt deleted file mode 100644 index 5635a669f..000000000 --- a/image/src/test/java/jp/toastkid/image/factory/GifImageLoaderFactoryTest.kt +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2022 toastkidjp. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompany this distribution. - * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html. - */ - -package jp.toastkid.image.factory - -import android.content.Context -import coil3.ComponentRegistry -import coil3.ImageLoader -import coil3.decode.Decoder -import io.mockk.MockKAnnotations -import io.mockk.every -import io.mockk.impl.annotations.InjectMockKs -import io.mockk.impl.annotations.MockK -import io.mockk.mockk -import io.mockk.mockkConstructor -import io.mockk.unmockkAll -import io.mockk.verify -import org.junit.After -import org.junit.Before -import org.junit.Test - -class GifImageLoaderFactoryTest { - - @InjectMockKs - private lateinit var gifImageLoaderFactory: GifImageLoaderFactory - - @MockK - private lateinit var builder: ImageLoader.Builder - - @MockK - private lateinit var componentRegistryBuilder: ComponentRegistry.Builder - - @MockK - private lateinit var context: Context - - @Before - fun setUp() { - MockKAnnotations.init(this) - - mockkConstructor(ImageLoader.Builder::class) - every { anyConstructed().components(any()) }.returns(builder) - every { builder.build() }.returns(mockk()) - mockkConstructor(ComponentRegistry.Builder::class) - every { anyConstructed().add(any()) }.returns(componentRegistryBuilder) - every { componentRegistryBuilder.build() }.returns(mockk()) - every { context.applicationContext }.returns(context) - } - - @After - fun tearDown() { - unmockkAll() - } - - @Test - fun testInvoke() { - gifImageLoaderFactory.invoke(context) - - verify { builder.build() } - verify { componentRegistryBuilder.build() } - } - -} \ No newline at end of file From 55817f9cd3f3dc72e1031de00ede5cc710145d5e Mon Sep 17 00:00:00 2001 From: Toast Kid Date: Sun, 15 Dec 2024 11:04:48 +0900 Subject: [PATCH 6/9] refactor #506 Delete useless class. --- .../image/factory/GifImageLoaderFactory.kt | 26 ------------------- 1 file changed, 26 deletions(-) delete mode 100644 image/src/main/java/jp/toastkid/image/factory/GifImageLoaderFactory.kt diff --git a/image/src/main/java/jp/toastkid/image/factory/GifImageLoaderFactory.kt b/image/src/main/java/jp/toastkid/image/factory/GifImageLoaderFactory.kt deleted file mode 100644 index 402d57e42..000000000 --- a/image/src/main/java/jp/toastkid/image/factory/GifImageLoaderFactory.kt +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2022 toastkidjp. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompany this distribution. - * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html. - */ - -package jp.toastkid.image.factory - -import android.content.Context -import coil3.ComponentRegistry -import coil3.ImageLoader -import coil3.gif.GifDecoder - -class GifImageLoaderFactory { - - operator fun invoke(context: Context) = ImageLoader.Builder(context) - .components( - ComponentRegistry.Builder() - .add(GifDecoder.Factory()) - .build() - ) - .build() - -} \ No newline at end of file From e41407ae879badede247ff055983dd843696f61f Mon Sep 17 00:00:00 2001 From: Toast Kid Date: Sun, 15 Dec 2024 11:11:30 +0900 Subject: [PATCH 7/9] refactor #412 Specify version directly. --- barcode/ui/build.gradle.kts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/barcode/ui/build.gradle.kts b/barcode/ui/build.gradle.kts index c8b25fc75..5341f888f 100644 --- a/barcode/ui/build.gradle.kts +++ b/barcode/ui/build.gradle.kts @@ -57,8 +57,8 @@ dependencies { implementation("androidx.lifecycle:lifecycle-runtime-ktx:${LibraryVersion.lifecycle}") implementation(libraries.activityCompose) - implementation("androidx.camera:camera-camera2:${LibraryVersion.cameraX}") - implementation("androidx.camera:camera-lifecycle:${LibraryVersion.cameraX}") + implementation("androidx.camera:camera-camera2:1.0.2") + implementation("androidx.camera:camera-lifecycle:1.0.2") implementation("androidx.camera:camera-view:1.3.4") implementation("com.jakewharton.timber:timber:${LibraryVersion.timber}") From 44d17f491d06d68824a1a34f9db33edc9c746d74 Mon Sep 17 00:00:00 2001 From: Toast Kid Date: Sun, 15 Dec 2024 11:11:55 +0900 Subject: [PATCH 8/9] refactor #853 Delete useless version. --- buildSrc/src/main/java/property/LibraryVersion.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/buildSrc/src/main/java/property/LibraryVersion.kt b/buildSrc/src/main/java/property/LibraryVersion.kt index 1d2afc295..70e0b013b 100644 --- a/buildSrc/src/main/java/property/LibraryVersion.kt +++ b/buildSrc/src/main/java/property/LibraryVersion.kt @@ -13,5 +13,4 @@ object LibraryVersion { val robolectric = "4.8.1" val mockk = "1.10.6" val coroutinesTest = "1.5.1" - val cameraX = "1.0.2" } From 23d0017d99409a5a6771ce901552e5eaca4f97ce Mon Sep 17 00:00:00 2001 From: Toast Kid Date: Sun, 15 Dec 2024 11:13:16 +0900 Subject: [PATCH 9/9] release #533 Upgrade to 2.0.81. --- buildSrc/src/main/java/property/Version.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/java/property/Version.kt b/buildSrc/src/main/java/property/Version.kt index 8cf352ed4..a63a94a16 100644 --- a/buildSrc/src/main/java/property/Version.kt +++ b/buildSrc/src/main/java/property/Version.kt @@ -3,7 +3,7 @@ package property object Version { private const val MAJOR = 2 private const val MIDDLE = 0 - private const val MINOR = 80 + private const val MINOR = 81 init { if (MIDDLE >= 100 || MINOR >= 10_000) {








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/toastkidjp/Yobidashi_kt/commit/2fe53a44904c92a5ca3d127225f4bdb3403c60c5.patch

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy