diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 2659051d13..e3299bd1df 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -95,11 +95,11 @@ android { pickFirsts.add("lib/*/libcoder.so") } resources { - excludes += "META-INF/*" - excludes += "kotlin/*" - excludes += "org/*" - excludes += "*.properties" - excludes += "*.bin" + excludes += "META-INF/" + excludes += "kotlin/" + excludes += "org/" + excludes += ".properties" + excludes += ".bin" excludes += "META-INF/versions/9/OSGI-INF/MANIFEST.MF" } } diff --git a/feature/filters/src/main/java/ru/tech/imageresizershrinker/feature/filters/data/AndroidFavoriteFiltersInteractor.kt b/feature/filters/src/main/java/ru/tech/imageresizershrinker/feature/filters/data/AndroidFavoriteFiltersInteractor.kt index 9858b6cf0e..406669b034 100644 --- a/feature/filters/src/main/java/ru/tech/imageresizershrinker/feature/filters/data/AndroidFavoriteFiltersInteractor.kt +++ b/feature/filters/src/main/java/ru/tech/imageresizershrinker/feature/filters/data/AndroidFavoriteFiltersInteractor.kt @@ -56,14 +56,13 @@ import ru.tech.imageresizershrinker.core.filters.domain.model.TransferFunc import ru.tech.imageresizershrinker.core.filters.domain.model.WaterParams import ru.tech.imageresizershrinker.core.resources.R import ru.tech.imageresizershrinker.core.ui.utils.helper.toImageModel -import ru.tech.imageresizershrinker.feature.filters.di.FilterInteractorDataStore import java.io.File import javax.inject.Inject import kotlin.reflect.full.primaryConstructor internal class AndroidFavoriteFiltersInteractor @Inject constructor( @ApplicationContext private val context: Context, - @FilterInteractorDataStore private val dataStore: DataStore, + private val dataStore: DataStore, private val fileController: FileController, private val imageCompressor: ImageCompressor, private val imageGetter: ImageGetter @@ -530,7 +529,7 @@ internal class AndroidFavoriteFiltersInteractor @Inject constructor( if (includeValue && value != null) { callBy(mapOf(parameters[0] to value)) } else callBy(emptyMap()) - } catch (e: Throwable) { + } catch (_: Throwable) { callBy(emptyMap()) } } diff --git a/feature/filters/src/main/java/ru/tech/imageresizershrinker/feature/filters/di/FilterModule.kt b/feature/filters/src/main/java/ru/tech/imageresizershrinker/feature/filters/di/FilterModule.kt index 573699c768..f3c81e39e9 100644 --- a/feature/filters/src/main/java/ru/tech/imageresizershrinker/feature/filters/di/FilterModule.kt +++ b/feature/filters/src/main/java/ru/tech/imageresizershrinker/feature/filters/di/FilterModule.kt @@ -17,19 +17,12 @@ package ru.tech.imageresizershrinker.feature.filters.di -import android.content.Context import android.graphics.Bitmap import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Path -import androidx.datastore.core.DataStore -import androidx.datastore.preferences.core.PreferenceDataStoreFactory -import androidx.datastore.preferences.core.Preferences -import androidx.datastore.preferences.preferencesDataStoreFile import dagger.Binds import dagger.Module -import dagger.Provides import dagger.hilt.InstallIn -import dagger.hilt.android.qualifiers.ApplicationContext import dagger.hilt.components.SingletonComponent import ru.tech.imageresizershrinker.core.filters.domain.FavoriteFiltersInteractor import ru.tech.imageresizershrinker.core.filters.domain.FilterProvider @@ -56,19 +49,6 @@ internal interface FilterModule { applier: AndroidFilterMaskApplier ): FilterMaskApplier - companion object { - - @FilterInteractorDataStore - @Singleton - @Provides - fun filterInteractorDataStore( - @ApplicationContext context: Context - ): DataStore = PreferenceDataStoreFactory.create( - produceFile = { context.preferencesDataStoreFile("favorite_filters") }, - ) - - } - @Singleton @Binds fun favoriteFiltersInteractor( diff --git a/feature/filters/src/main/java/ru/tech/imageresizershrinker/feature/filters/di/Qualifiers.kt b/feature/filters/src/main/java/ru/tech/imageresizershrinker/feature/filters/di/Qualifiers.kt deleted file mode 100644 index 0d8fa05a76..0000000000 --- a/feature/filters/src/main/java/ru/tech/imageresizershrinker/feature/filters/di/Qualifiers.kt +++ /dev/null @@ -1,24 +0,0 @@ -/* - * ImageToolbox is an image editor for android - * Copyright (c) 2024 T8RIN (Malik Mukhametzyanov) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * You should have received a copy of the Apache License - * along with this program. If not, see . - */ - -package ru.tech.imageresizershrinker.feature.filters.di - -import javax.inject.Qualifier - -@Qualifier -@Retention(AnnotationRetention.RUNTIME) -annotation class FilterInteractorDataStore \ No newline at end of file