From 68c8239aeb7cac525f7528645e49af97a362b698 Mon Sep 17 00:00:00 2001 From: tuancoltech Date: Sat, 14 Oct 2023 22:17:07 +0700 Subject: [PATCH] [build errors] Correct package name for classes from arklib due to recent package name refactoring --- app/build.gradle | 6 ++- .../navigator/data/StorageBackup.kt | 7 ++-- .../data/stats/AggregatedStatsStorage.kt | 4 +- .../navigator/data/stats/PlainStatsStorage.kt | 6 +-- .../navigator/data/stats/StatsStorage.kt | 4 +- .../navigator/data/stats/StatsStorageRepo.kt | 10 ++--- .../stats/category/StatsCategoryStorage.kt | 2 +- .../data/stats/category/TagLabeledNStorage.kt | 8 ++-- .../stats/category/TagLabeledTSStorage.kt | 4 +- .../data/stats/category/TagQueriedNStorage.kt | 4 +- .../stats/category/TagQueriedTSStorage.kt | 4 +- .../navigator/di/modules/RepoModule.kt | 14 +++---- .../presentation/dialog/DetailsAlertDialog.kt | 4 +- .../dialog/edittags/EditTagsDialogFragment.kt | 8 ++-- .../edittags/EditTagsDialogPresenter.kt | 14 +++---- .../dialog/edittags/EditTagsDialogView.kt | 4 +- .../presentation/navigation/Screens.kt | 2 +- .../screen/folders/FoldersViewModel.kt | 2 +- .../screen/gallery/GalleryFragment.kt | 8 ++-- .../screen/gallery/GalleryPresenter.kt | 41 +++++++++---------- .../screen/gallery/GalleryView.kt | 6 +-- .../previewpager/PreviewImageViewHolder.kt | 6 +-- .../gallery/previewpager/PreviewsPager.kt | 4 +- .../screen/resources/ResourcesFragment.kt | 2 +- .../screen/resources/ResourcesPresenter.kt | 26 ++++++------ .../resources/adapter/FileItemViewHolder.kt | 8 ++-- .../adapter/ResourcesGridPresenter.kt | 12 +++--- .../presentation/utils/StringProvider.kt | 2 +- .../utils/extra/DocumentExtraLoader.kt | 2 +- .../presentation/utils/extra/ExtraLoader.kt | 2 +- .../utils/extra/LinkExtraLoader.kt | 2 +- .../utils/extra/VideoExtraLoader.kt | 2 +- build.gradle | 1 + 33 files changed, 117 insertions(+), 114 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 56c33e28..231e74e2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -88,11 +88,11 @@ android { dependencies { //For local developments of arklib-android: //def arklibVersion = '999' - def arklibVersion = '0.3.2' + def arklibVersion = '0.3.3' releaseImplementation "dev.arkbuilders:arklib:$arklibVersion" debugImplementation "dev.arkbuilders:arklib-debug:$arklibVersion" - implementation("dev.arkbuilders:components:0.0.3") { + implementation("dev.arkbuilders:components:0.0.6") { exclude group: "dev.arkbuilders", module: "arklib" } @@ -121,6 +121,8 @@ dependencies { implementation 'com.davemorrissey.labs:subsampling-scale-image-view-androidx:3.10.0' implementation 'com.github.MikeOrtiz:TouchImageView:3.1.1' + implementation 'dev.arkbuilders:arkfilepicker:0.1.1' + implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2" implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.4.0-rc01" diff --git a/app/src/main/java/dev/arkbuilders/navigator/data/StorageBackup.kt b/app/src/main/java/dev/arkbuilders/navigator/data/StorageBackup.kt index f216a801..6b71fd7d 100644 --- a/app/src/main/java/dev/arkbuilders/navigator/data/StorageBackup.kt +++ b/app/src/main/java/dev/arkbuilders/navigator/data/StorageBackup.kt @@ -1,9 +1,9 @@ package dev.arkbuilders.navigator.data +import dev.arkbuilders.arkfilepicker.folders.FoldersRepo import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch -import dev.arkbuilders.arkfilepicker.folders.FoldersRepo import dev.arkbuilders.arklib.ArkFiles import dev.arkbuilders.arklib.arkFolder import dev.arkbuilders.navigator.data.preferences.PreferenceKey @@ -22,6 +22,7 @@ import kotlin.io.path.exists import kotlin.io.path.inputStream import kotlin.io.path.isRegularFile import kotlin.io.path.listDirectoryEntries +import kotlin.io.path.name import kotlin.io.path.notExists import kotlin.io.path.outputStream @@ -33,8 +34,8 @@ class StorageBackup @Inject constructor( private val today: String = keepDates[0] private val foldersToIgnore = listOf( - ArkFiles.PREVIEWS_FOLDER, - ArkFiles.THUMBNAILS_FOLDER + ArkFiles.PREVIEWS_STORAGE_FOLDER.name, + ArkFiles.THUMBNAILS_STORAGE_FOLDER.name ) private val filesToIgnore = listOf() diff --git a/app/src/main/java/dev/arkbuilders/navigator/data/stats/AggregatedStatsStorage.kt b/app/src/main/java/dev/arkbuilders/navigator/data/stats/AggregatedStatsStorage.kt index ccadab48..2550f5d6 100644 --- a/app/src/main/java/dev/arkbuilders/navigator/data/stats/AggregatedStatsStorage.kt +++ b/app/src/main/java/dev/arkbuilders/navigator/data/stats/AggregatedStatsStorage.kt @@ -4,8 +4,8 @@ import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.joinAll import kotlinx.coroutines.launch import kotlinx.coroutines.withContext -import dev.arkbuilders.arklib.domain.stats.StatsEvent -import dev.arkbuilders.arklib.domain.tags.Tag +import dev.arkbuilders.arklib.data.stats.StatsEvent +import dev.arkbuilders.arklib.user.tags.Tag class AggregatedStatsStorage(val shards: List) : StatsStorage { diff --git a/app/src/main/java/dev/arkbuilders/navigator/data/stats/PlainStatsStorage.kt b/app/src/main/java/dev/arkbuilders/navigator/data/stats/PlainStatsStorage.kt index cdb34b72..83310cb4 100644 --- a/app/src/main/java/dev/arkbuilders/navigator/data/stats/PlainStatsStorage.kt +++ b/app/src/main/java/dev/arkbuilders/navigator/data/stats/PlainStatsStorage.kt @@ -10,9 +10,9 @@ import kotlinx.coroutines.launch import kotlinx.coroutines.withContext import dev.arkbuilders.arklib.arkFolder import dev.arkbuilders.arklib.arkStats -import dev.arkbuilders.arklib.domain.index.RootIndex -import dev.arkbuilders.arklib.domain.stats.StatsEvent -import dev.arkbuilders.arklib.domain.tags.RootTagsStorage +import dev.arkbuilders.arklib.data.index.RootIndex +import dev.arkbuilders.arklib.data.stats.StatsEvent +import dev.arkbuilders.arklib.user.tags.RootTagsStorage import dev.arkbuilders.navigator.data.preferences.PreferenceKey import dev.arkbuilders.navigator.data.preferences.Preferences import dev.arkbuilders.navigator.data.stats.category.StatsCategoryStorage diff --git a/app/src/main/java/dev/arkbuilders/navigator/data/stats/StatsStorage.kt b/app/src/main/java/dev/arkbuilders/navigator/data/stats/StatsStorage.kt index 7540fa3b..5fe758ef 100644 --- a/app/src/main/java/dev/arkbuilders/navigator/data/stats/StatsStorage.kt +++ b/app/src/main/java/dev/arkbuilders/navigator/data/stats/StatsStorage.kt @@ -1,7 +1,7 @@ package dev.arkbuilders.navigator.data.stats -import dev.arkbuilders.arklib.domain.stats.StatsEvent -import dev.arkbuilders.arklib.domain.tags.Tag +import dev.arkbuilders.arklib.data.stats.StatsEvent +import dev.arkbuilders.arklib.user.tags.Tag interface StatsStorage { suspend fun init() diff --git a/app/src/main/java/dev/arkbuilders/navigator/data/stats/StatsStorageRepo.kt b/app/src/main/java/dev/arkbuilders/navigator/data/stats/StatsStorageRepo.kt index 607b9c57..b3ecb85d 100644 --- a/app/src/main/java/dev/arkbuilders/navigator/data/stats/StatsStorageRepo.kt +++ b/app/src/main/java/dev/arkbuilders/navigator/data/stats/StatsStorageRepo.kt @@ -1,11 +1,11 @@ package dev.arkbuilders.navigator.data.stats import kotlinx.coroutines.flow.SharedFlow -import dev.arkbuilders.arklib.domain.index.ResourceIndex -import dev.arkbuilders.arklib.domain.index.RootIndex -import dev.arkbuilders.arklib.domain.stats.StatsEvent -import dev.arkbuilders.arklib.domain.tags.RootTagsStorage -import dev.arkbuilders.arklib.domain.tags.TagsStorageRepo +import dev.arkbuilders.arklib.data.index.ResourceIndex +import dev.arkbuilders.arklib.data.index.RootIndex +import dev.arkbuilders.arklib.data.stats.StatsEvent +import dev.arkbuilders.arklib.user.tags.RootTagsStorage +import dev.arkbuilders.arklib.user.tags.TagsStorageRepo import dev.arkbuilders.navigator.data.preferences.Preferences import java.nio.file.Path diff --git a/app/src/main/java/dev/arkbuilders/navigator/data/stats/category/StatsCategoryStorage.kt b/app/src/main/java/dev/arkbuilders/navigator/data/stats/category/StatsCategoryStorage.kt index f57085a9..ba633162 100644 --- a/app/src/main/java/dev/arkbuilders/navigator/data/stats/category/StatsCategoryStorage.kt +++ b/app/src/main/java/dev/arkbuilders/navigator/data/stats/category/StatsCategoryStorage.kt @@ -8,7 +8,7 @@ import kotlinx.coroutines.flow.onEach import kotlinx.coroutines.launch import dev.arkbuilders.arklib.arkFolder import dev.arkbuilders.arklib.arkStats -import dev.arkbuilders.arklib.domain.stats.StatsEvent +import dev.arkbuilders.arklib.data.stats.StatsEvent import timber.log.Timber import java.nio.file.Path diff --git a/app/src/main/java/dev/arkbuilders/navigator/data/stats/category/TagLabeledNStorage.kt b/app/src/main/java/dev/arkbuilders/navigator/data/stats/category/TagLabeledNStorage.kt index 5b2a387c..d618acc1 100644 --- a/app/src/main/java/dev/arkbuilders/navigator/data/stats/category/TagLabeledNStorage.kt +++ b/app/src/main/java/dev/arkbuilders/navigator/data/stats/category/TagLabeledNStorage.kt @@ -5,10 +5,10 @@ import kotlinx.serialization.Serializable import kotlinx.serialization.encodeToString import kotlinx.serialization.json.Json import kotlinx.serialization.json.decodeFromStream -import dev.arkbuilders.arklib.domain.index.ResourceIndex -import dev.arkbuilders.arklib.domain.stats.StatsEvent -import dev.arkbuilders.arklib.domain.tags.TagStorage -import dev.arkbuilders.arklib.domain.tags.Tag +import dev.arkbuilders.arklib.data.index.ResourceIndex +import dev.arkbuilders.arklib.data.stats.StatsEvent +import dev.arkbuilders.arklib.user.tags.TagStorage +import dev.arkbuilders.arklib.user.tags.Tag import timber.log.Timber import java.nio.file.Path import kotlin.io.path.exists diff --git a/app/src/main/java/dev/arkbuilders/navigator/data/stats/category/TagLabeledTSStorage.kt b/app/src/main/java/dev/arkbuilders/navigator/data/stats/category/TagLabeledTSStorage.kt index e137c18c..c4bbe779 100644 --- a/app/src/main/java/dev/arkbuilders/navigator/data/stats/category/TagLabeledTSStorage.kt +++ b/app/src/main/java/dev/arkbuilders/navigator/data/stats/category/TagLabeledTSStorage.kt @@ -5,8 +5,8 @@ import kotlinx.serialization.Serializable import kotlinx.serialization.encodeToString import kotlinx.serialization.json.Json import kotlinx.serialization.json.decodeFromStream -import dev.arkbuilders.arklib.domain.stats.StatsEvent -import dev.arkbuilders.arklib.domain.tags.Tag +import dev.arkbuilders.arklib.data.stats.StatsEvent +import dev.arkbuilders.arklib.user.tags.Tag import timber.log.Timber import java.nio.file.Path import kotlin.io.path.inputStream diff --git a/app/src/main/java/dev/arkbuilders/navigator/data/stats/category/TagQueriedNStorage.kt b/app/src/main/java/dev/arkbuilders/navigator/data/stats/category/TagQueriedNStorage.kt index 72a51f19..63754cab 100644 --- a/app/src/main/java/dev/arkbuilders/navigator/data/stats/category/TagQueriedNStorage.kt +++ b/app/src/main/java/dev/arkbuilders/navigator/data/stats/category/TagQueriedNStorage.kt @@ -8,8 +8,8 @@ import kotlinx.serialization.Serializable import kotlinx.serialization.encodeToString import kotlinx.serialization.json.Json import kotlinx.serialization.json.decodeFromStream -import dev.arkbuilders.arklib.domain.stats.StatsEvent -import dev.arkbuilders.arklib.domain.tags.Tag +import dev.arkbuilders.arklib.data.stats.StatsEvent +import dev.arkbuilders.arklib.user.tags.Tag import timber.log.Timber import java.nio.file.Path import kotlin.io.path.inputStream diff --git a/app/src/main/java/dev/arkbuilders/navigator/data/stats/category/TagQueriedTSStorage.kt b/app/src/main/java/dev/arkbuilders/navigator/data/stats/category/TagQueriedTSStorage.kt index cd6ee16a..56b0cdfe 100644 --- a/app/src/main/java/dev/arkbuilders/navigator/data/stats/category/TagQueriedTSStorage.kt +++ b/app/src/main/java/dev/arkbuilders/navigator/data/stats/category/TagQueriedTSStorage.kt @@ -5,8 +5,8 @@ import kotlinx.serialization.Serializable import kotlinx.serialization.encodeToString import kotlinx.serialization.json.Json import kotlinx.serialization.json.decodeFromStream -import dev.arkbuilders.arklib.domain.stats.StatsEvent -import dev.arkbuilders.arklib.domain.tags.Tag +import dev.arkbuilders.arklib.data.stats.StatsEvent +import dev.arkbuilders.arklib.user.tags.Tag import timber.log.Timber import java.nio.file.Path import kotlin.io.path.inputStream diff --git a/app/src/main/java/dev/arkbuilders/navigator/di/modules/RepoModule.kt b/app/src/main/java/dev/arkbuilders/navigator/di/modules/RepoModule.kt index 5d145aa2..2bc89fc1 100644 --- a/app/src/main/java/dev/arkbuilders/navigator/di/modules/RepoModule.kt +++ b/app/src/main/java/dev/arkbuilders/navigator/di/modules/RepoModule.kt @@ -7,13 +7,13 @@ import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.flow.MutableSharedFlow import dev.arkbuilders.arkfilepicker.folders.FoldersRepo -import dev.arkbuilders.arklib.domain.Message -import dev.arkbuilders.arklib.domain.index.ResourceIndexRepo -import dev.arkbuilders.arklib.domain.meta.MetadataProcessorRepo -import dev.arkbuilders.arklib.domain.preview.PreviewProcessorRepo -import dev.arkbuilders.arklib.domain.score.ScoreStorageRepo -import dev.arkbuilders.arklib.domain.stats.StatsEvent -import dev.arkbuilders.arklib.domain.tags.TagsStorageRepo +import dev.arkbuilders.arklib.data.Message +import dev.arkbuilders.arklib.data.index.ResourceIndexRepo +import dev.arkbuilders.arklib.data.meta.MetadataProcessorRepo +import dev.arkbuilders.arklib.data.preview.PreviewProcessorRepo +import dev.arkbuilders.arklib.user.score.ScoreStorageRepo +import dev.arkbuilders.arklib.data.stats.StatsEvent +import dev.arkbuilders.arklib.user.tags.TagsStorageRepo import dev.arkbuilders.navigator.data.preferences.Preferences import dev.arkbuilders.navigator.data.stats.StatsStorageRepo import dev.arkbuilders.navigator.data.utils.LogTags.MAIN diff --git a/app/src/main/java/dev/arkbuilders/navigator/presentation/dialog/DetailsAlertDialog.kt b/app/src/main/java/dev/arkbuilders/navigator/presentation/dialog/DetailsAlertDialog.kt index 59774f7c..e385a685 100644 --- a/app/src/main/java/dev/arkbuilders/navigator/presentation/dialog/DetailsAlertDialog.kt +++ b/app/src/main/java/dev/arkbuilders/navigator/presentation/dialog/DetailsAlertDialog.kt @@ -10,8 +10,8 @@ import android.view.WindowManager import org.apache.commons.io.FileUtils import dev.arkbuilders.navigator.R import dev.arkbuilders.navigator.databinding.DialogResourceInfoBinding -import dev.arkbuilders.arklib.domain.index.Resource -import dev.arkbuilders.arklib.domain.meta.Metadata +import dev.arkbuilders.arklib.data.index.Resource +import dev.arkbuilders.arklib.data.meta.Metadata import dev.arkbuilders.navigator.presentation.utils.extra.ExtraLoader import java.nio.file.Path import kotlin.io.path.absolutePathString diff --git a/app/src/main/java/dev/arkbuilders/navigator/presentation/dialog/edittags/EditTagsDialogFragment.kt b/app/src/main/java/dev/arkbuilders/navigator/presentation/dialog/edittags/EditTagsDialogFragment.kt index 8adec8f8..bf4580c4 100644 --- a/app/src/main/java/dev/arkbuilders/navigator/presentation/dialog/edittags/EditTagsDialogFragment.kt +++ b/app/src/main/java/dev/arkbuilders/navigator/presentation/dialog/edittags/EditTagsDialogFragment.kt @@ -21,15 +21,15 @@ import moxy.MvpAppCompatDialogFragment import moxy.ktx.moxyPresenter import dev.arkbuilders.arkfilepicker.folders.RootAndFav import dev.arkbuilders.arklib.ResourceId -import dev.arkbuilders.arklib.domain.index.ResourceIndex -import dev.arkbuilders.arklib.domain.tags.TagStorage +import dev.arkbuilders.arklib.data.index.ResourceIndex +import dev.arkbuilders.arklib.user.tags.TagStorage import dev.arkbuilders.navigator.R import dev.arkbuilders.navigator.databinding.DialogEditTagsBinding import dev.arkbuilders.navigator.data.stats.StatsStorage import dev.arkbuilders.navigator.presentation.App import dev.arkbuilders.navigator.presentation.dialog.tagssort.TagsSortDialogFragment -import dev.arkbuilders.arklib.domain.tags.Tag -import dev.arkbuilders.arklib.domain.tags.Tags +import dev.arkbuilders.arklib.user.tags.Tag +import dev.arkbuilders.arklib.user.tags.Tags import dev.arkbuilders.navigator.presentation.utils.placeCursorToEnd import dev.arkbuilders.navigator.presentation.utils.showKeyboard diff --git a/app/src/main/java/dev/arkbuilders/navigator/presentation/dialog/edittags/EditTagsDialogPresenter.kt b/app/src/main/java/dev/arkbuilders/navigator/presentation/dialog/edittags/EditTagsDialogPresenter.kt index b5d2269e..d70d488c 100644 --- a/app/src/main/java/dev/arkbuilders/navigator/presentation/dialog/edittags/EditTagsDialogPresenter.kt +++ b/app/src/main/java/dev/arkbuilders/navigator/presentation/dialog/edittags/EditTagsDialogPresenter.kt @@ -16,13 +16,13 @@ import moxy.MvpPresenter import moxy.presenterScope import dev.arkbuilders.arkfilepicker.folders.RootAndFav import dev.arkbuilders.arklib.ResourceId -import dev.arkbuilders.arklib.domain.index.ResourceIndex -import dev.arkbuilders.arklib.domain.index.ResourceIndexRepo -import dev.arkbuilders.arklib.domain.stats.StatsEvent -import dev.arkbuilders.arklib.domain.tags.Tag -import dev.arkbuilders.arklib.domain.tags.TagStorage -import dev.arkbuilders.arklib.domain.tags.TagUtils -import dev.arkbuilders.arklib.domain.tags.TagsStorageRepo +import dev.arkbuilders.arklib.data.index.ResourceIndex +import dev.arkbuilders.arklib.data.index.ResourceIndexRepo +import dev.arkbuilders.arklib.data.stats.StatsEvent +import dev.arkbuilders.arklib.user.tags.Tag +import dev.arkbuilders.arklib.user.tags.TagStorage +import dev.arkbuilders.arklib.user.tags.TagUtils +import dev.arkbuilders.arklib.user.tags.TagsStorageRepo import javax.inject.Inject sealed class EditTagsAction { diff --git a/app/src/main/java/dev/arkbuilders/navigator/presentation/dialog/edittags/EditTagsDialogView.kt b/app/src/main/java/dev/arkbuilders/navigator/presentation/dialog/edittags/EditTagsDialogView.kt index 1e6cb4a9..b20e79e1 100644 --- a/app/src/main/java/dev/arkbuilders/navigator/presentation/dialog/edittags/EditTagsDialogView.kt +++ b/app/src/main/java/dev/arkbuilders/navigator/presentation/dialog/edittags/EditTagsDialogView.kt @@ -4,8 +4,8 @@ import moxy.MvpView import moxy.viewstate.strategy.AddToEndSingleStrategy import moxy.viewstate.strategy.SkipStrategy import moxy.viewstate.strategy.StateStrategyType -import dev.arkbuilders.arklib.domain.tags.Tag -import dev.arkbuilders.arklib.domain.tags.Tags +import dev.arkbuilders.arklib.user.tags.Tag +import dev.arkbuilders.arklib.user.tags.Tags @StateStrategyType(AddToEndSingleStrategy::class) interface EditTagsDialogView : MvpView { diff --git a/app/src/main/java/dev/arkbuilders/navigator/presentation/navigation/Screens.kt b/app/src/main/java/dev/arkbuilders/navigator/presentation/navigation/Screens.kt index 4df63bfe..91a2cf53 100644 --- a/app/src/main/java/dev/arkbuilders/navigator/presentation/navigation/Screens.kt +++ b/app/src/main/java/dev/arkbuilders/navigator/presentation/navigation/Screens.kt @@ -7,7 +7,7 @@ import dev.arkbuilders.navigator.presentation.screen.folders.FoldersFragment import dev.arkbuilders.navigator.presentation.screen.gallery.GalleryFragment import dev.arkbuilders.navigator.presentation.screen.resources.ResourcesFragment import dev.arkbuilders.navigator.presentation.screen.settings.SettingsFragment -import dev.arkbuilders.arklib.domain.tags.Tag +import dev.arkbuilders.arklib.user.tags.Tag class Screens { class FoldersScreen : SupportAppScreen() { diff --git a/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/folders/FoldersViewModel.kt b/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/folders/FoldersViewModel.kt index defadbf9..f7f24597 100644 --- a/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/folders/FoldersViewModel.kt +++ b/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/folders/FoldersViewModel.kt @@ -19,7 +19,7 @@ import org.orbitmvi.orbit.syntax.simple.postSideEffect import org.orbitmvi.orbit.syntax.simple.reduce import org.orbitmvi.orbit.viewmodel.container import dev.arkbuilders.arkfilepicker.folders.FoldersRepo -import dev.arkbuilders.arklib.domain.index.ResourceIndexRepo +import dev.arkbuilders.arklib.data.index.ResourceIndexRepo import java.nio.file.Path class ProgressWithText(val enabled: Boolean, val text: String = "") diff --git a/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/gallery/GalleryFragment.kt b/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/gallery/GalleryFragment.kt index ac29e341..a623d30d 100644 --- a/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/gallery/GalleryFragment.kt +++ b/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/gallery/GalleryFragment.kt @@ -47,10 +47,10 @@ import moxy.MvpAppCompatFragment import moxy.ktx.moxyPresenter import dev.arkbuilders.arkfilepicker.folders.RootAndFav import dev.arkbuilders.arklib.ResourceId -import dev.arkbuilders.arklib.domain.index.Resource -import dev.arkbuilders.arklib.domain.meta.Metadata -import dev.arkbuilders.arklib.domain.tags.Tag -import dev.arkbuilders.arklib.domain.tags.Tags +import dev.arkbuilders.arklib.data.index.Resource +import dev.arkbuilders.arklib.data.meta.Metadata +import dev.arkbuilders.arklib.user.tags.Tag +import dev.arkbuilders.arklib.user.tags.Tags import dev.arkbuilders.arklib.utils.extension import timber.log.Timber import java.nio.file.Path diff --git a/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/gallery/GalleryPresenter.kt b/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/gallery/GalleryPresenter.kt index c7bf89a2..a8903eb9 100644 --- a/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/gallery/GalleryPresenter.kt +++ b/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/gallery/GalleryPresenter.kt @@ -25,25 +25,24 @@ import moxy.MvpPresenter import moxy.presenterScope import dev.arkbuilders.arkfilepicker.folders.RootAndFav import dev.arkbuilders.arklib.ResourceId -import dev.arkbuilders.arklib.domain.Message -import dev.arkbuilders.arklib.domain.index.Resource -import dev.arkbuilders.arklib.domain.index.ResourceIndex -import dev.arkbuilders.arklib.domain.index.ResourceIndexRepo -import dev.arkbuilders.arklib.domain.meta.Kind -import dev.arkbuilders.arklib.domain.meta.Metadata -import dev.arkbuilders.arklib.domain.meta.MetadataProcessor -import dev.arkbuilders.arklib.domain.meta.MetadataProcessorRepo -import dev.arkbuilders.arklib.domain.preview.PreviewLocator -import dev.arkbuilders.arklib.domain.preview.PreviewProcessor -import dev.arkbuilders.arklib.domain.preview.PreviewProcessorRepo -import dev.arkbuilders.arklib.domain.score.ScoreStorage -import dev.arkbuilders.arklib.domain.score.ScoreStorageRepo -import dev.arkbuilders.arklib.domain.stats.StatsEvent -import dev.arkbuilders.arklib.domain.storage.StorageException -import dev.arkbuilders.arklib.domain.tags.Tag -import dev.arkbuilders.arklib.domain.tags.TagStorage -import dev.arkbuilders.arklib.domain.tags.Tags -import dev.arkbuilders.arklib.domain.tags.TagsStorageRepo +import dev.arkbuilders.arklib.data.Message +import dev.arkbuilders.arklib.data.index.Resource +import dev.arkbuilders.arklib.data.index.ResourceIndex +import dev.arkbuilders.arklib.data.index.ResourceIndexRepo +import dev.arkbuilders.arklib.data.meta.Metadata +import dev.arkbuilders.arklib.data.meta.MetadataProcessor +import dev.arkbuilders.arklib.data.meta.MetadataProcessorRepo +import dev.arkbuilders.arklib.data.preview.PreviewLocator +import dev.arkbuilders.arklib.data.preview.PreviewProcessor +import dev.arkbuilders.arklib.data.preview.PreviewProcessorRepo +import dev.arkbuilders.arklib.data.stats.StatsEvent +import dev.arkbuilders.arklib.data.storage.StorageException +import dev.arkbuilders.arklib.user.score.ScoreStorage +import dev.arkbuilders.arklib.user.score.ScoreStorageRepo +import dev.arkbuilders.arklib.user.tags.Tag +import dev.arkbuilders.arklib.user.tags.TagStorage +import dev.arkbuilders.arklib.user.tags.Tags +import dev.arkbuilders.arklib.user.tags.TagsStorageRepo import dev.arkbuilders.arklib.utils.ImageUtils import dev.arkbuilders.arklib.utils.extension import timber.log.Timber @@ -198,8 +197,8 @@ class GalleryPresenter( checkResourceChanges(currentPos) } - fun getKind(pos: Int): Kind = - galleryItems[pos].metadata.kind + fun getKind(pos: Int): Int = + galleryItems[pos].metadata.kind.ordinal fun bindView(view: PreviewImageViewHolder) = presenterScope.launch { view.reset() diff --git a/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/gallery/GalleryView.kt b/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/gallery/GalleryView.kt index 3ed7ebe0..4d856a2d 100644 --- a/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/gallery/GalleryView.kt +++ b/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/gallery/GalleryView.kt @@ -5,9 +5,9 @@ import moxy.viewstate.strategy.AddToEndSingleStrategy import moxy.viewstate.strategy.SkipStrategy import moxy.viewstate.strategy.StateStrategyType import dev.arkbuilders.arklib.ResourceId -import dev.arkbuilders.arklib.domain.index.Resource -import dev.arkbuilders.arklib.domain.meta.Metadata -import dev.arkbuilders.arklib.domain.tags.Tags +import dev.arkbuilders.arklib.data.index.Resource +import dev.arkbuilders.arklib.data.meta.Metadata +import dev.arkbuilders.arklib.user.tags.Tags import java.nio.file.Path @StateStrategyType(AddToEndSingleStrategy::class) diff --git a/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/gallery/previewpager/PreviewImageViewHolder.kt b/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/gallery/previewpager/PreviewImageViewHolder.kt index c6e21e05..2e814869 100644 --- a/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/gallery/previewpager/PreviewImageViewHolder.kt +++ b/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/gallery/previewpager/PreviewImageViewHolder.kt @@ -17,9 +17,9 @@ import kotlinx.coroutines.launch import kotlinx.coroutines.withContext import moxy.presenterScope import dev.arkbuilders.arklib.ResourceId -import dev.arkbuilders.arklib.domain.meta.Metadata -import dev.arkbuilders.arklib.domain.preview.PreviewLocator -import dev.arkbuilders.arklib.domain.preview.PreviewStatus +import dev.arkbuilders.arklib.data.meta.Metadata +import dev.arkbuilders.arklib.data.preview.PreviewLocator +import dev.arkbuilders.arklib.data.preview.PreviewStatus import dev.arkbuilders.arklib.utils.ImageUtils.loadGlideZoomImage import dev.arkbuilders.arklib.utils.ImageUtils.loadSubsamplingImage import timber.log.Timber diff --git a/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/gallery/previewpager/PreviewsPager.kt b/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/gallery/previewpager/PreviewsPager.kt index e7f9257f..8871be32 100644 --- a/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/gallery/previewpager/PreviewsPager.kt +++ b/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/gallery/previewpager/PreviewsPager.kt @@ -11,7 +11,7 @@ import androidx.recyclerview.widget.RecyclerView import dev.arkbuilders.navigator.databinding.ItemImageBinding import dev.arkbuilders.navigator.databinding.ItemPreviewPlainTextBinding import dev.arkbuilders.navigator.presentation.screen.gallery.GalleryPresenter -import dev.arkbuilders.arklib.domain.meta.Kind +import dev.arkbuilders.arklib.data.meta.Kind class PreviewsPager( val context: Context, @@ -43,7 +43,7 @@ class PreviewsPager( } override fun getItemViewType(position: Int) = - presenter.getKind(position).ordinal + presenter.getKind(position) @SuppressLint("ClickableViewAccessibility") override fun onBindViewHolder( diff --git a/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/resources/ResourcesFragment.kt b/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/resources/ResourcesFragment.kt index 53ca0686..fda2e743 100644 --- a/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/resources/ResourcesFragment.kt +++ b/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/resources/ResourcesFragment.kt @@ -44,7 +44,7 @@ import moxy.presenterScope import dev.arkbuilders.arkfilepicker.folders.RootAndFav import dev.arkbuilders.arkfilepicker.presentation.onArkPathPicked import dev.arkbuilders.arklib.ResourceId -import dev.arkbuilders.arklib.domain.tags.Tag +import dev.arkbuilders.arklib.user.tags.Tag import java.nio.file.Path import javax.inject.Inject import kotlin.io.path.Path diff --git a/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/resources/ResourcesPresenter.kt b/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/resources/ResourcesPresenter.kt index f5f11c35..f9e647e6 100644 --- a/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/resources/ResourcesPresenter.kt +++ b/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/resources/ResourcesPresenter.kt @@ -29,19 +29,19 @@ import moxy.presenterScope import dev.arkbuilders.arkfilepicker.folders.FoldersRepo import dev.arkbuilders.arkfilepicker.folders.RootAndFav import dev.arkbuilders.arklib.ResourceId -import dev.arkbuilders.arklib.domain.Message -import dev.arkbuilders.arklib.domain.index.ResourceIndex -import dev.arkbuilders.arklib.domain.index.ResourceIndexRepo -import dev.arkbuilders.arklib.domain.meta.MetadataProcessor -import dev.arkbuilders.arklib.domain.meta.MetadataProcessorRepo -import dev.arkbuilders.arklib.domain.preview.PreviewProcessor -import dev.arkbuilders.arklib.domain.preview.PreviewProcessorRepo -import dev.arkbuilders.arklib.domain.score.ScoreStorage -import dev.arkbuilders.arklib.domain.score.ScoreStorageRepo -import dev.arkbuilders.arklib.domain.storage.StorageException -import dev.arkbuilders.arklib.domain.tags.Tag -import dev.arkbuilders.arklib.domain.tags.TagStorage -import dev.arkbuilders.arklib.domain.tags.TagsStorageRepo +import dev.arkbuilders.arklib.data.Message +import dev.arkbuilders.arklib.data.index.ResourceIndex +import dev.arkbuilders.arklib.data.index.ResourceIndexRepo +import dev.arkbuilders.arklib.data.meta.MetadataProcessor +import dev.arkbuilders.arklib.data.meta.MetadataProcessorRepo +import dev.arkbuilders.arklib.data.preview.PreviewProcessor +import dev.arkbuilders.arklib.data.preview.PreviewProcessorRepo +import dev.arkbuilders.arklib.data.storage.StorageException +import dev.arkbuilders.arklib.user.score.ScoreStorage +import dev.arkbuilders.arklib.user.score.ScoreStorageRepo +import dev.arkbuilders.arklib.user.tags.Tag +import dev.arkbuilders.arklib.user.tags.TagStorage +import dev.arkbuilders.arklib.user.tags.TagsStorageRepo import timber.log.Timber import java.nio.file.Path import javax.inject.Inject diff --git a/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/resources/adapter/FileItemViewHolder.kt b/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/resources/adapter/FileItemViewHolder.kt index 9428625f..f3fcf65f 100644 --- a/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/resources/adapter/FileItemViewHolder.kt +++ b/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/resources/adapter/FileItemViewHolder.kt @@ -6,7 +6,7 @@ import androidx.core.view.isVisible import androidx.recyclerview.widget.RecyclerView import dev.arkbuilders.navigator.databinding.ItemFileGridBinding import dev.arkbuilders.navigator.presentation.utils.extra.ExtraLoader -import dev.arkbuilders.arklib.domain.score.Score +import dev.arkbuilders.arklib.user.score.Score import dev.arkbuilders.navigator.presentation.utils.dpToPx import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers @@ -15,9 +15,9 @@ import kotlinx.coroutines.isActive import kotlinx.coroutines.launch import kotlinx.coroutines.withContext import dev.arkbuilders.arklib.ResourceId -import dev.arkbuilders.arklib.domain.meta.Metadata -import dev.arkbuilders.arklib.domain.preview.PreviewLocator -import dev.arkbuilders.arklib.domain.preview.PreviewStatus +import dev.arkbuilders.arklib.data.meta.Metadata +import dev.arkbuilders.arklib.data.preview.PreviewLocator +import dev.arkbuilders.arklib.data.preview.PreviewStatus import dev.arkbuilders.arklib.utils.ImageUtils import dev.arkbuilders.arklib.utils.extension import timber.log.Timber diff --git a/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/resources/adapter/ResourcesGridPresenter.kt b/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/resources/adapter/ResourcesGridPresenter.kt index 56e5c62c..7f3ffe42 100644 --- a/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/resources/adapter/ResourcesGridPresenter.kt +++ b/app/src/main/java/dev/arkbuilders/navigator/presentation/screen/resources/adapter/ResourcesGridPresenter.kt @@ -19,12 +19,12 @@ import kotlinx.coroutines.runBlocking import kotlinx.coroutines.withContext import dev.arkbuilders.arkfilepicker.folders.RootAndFav import dev.arkbuilders.arklib.ResourceId -import dev.arkbuilders.arklib.domain.index.Resource -import dev.arkbuilders.arklib.domain.index.ResourceIndex -import dev.arkbuilders.arklib.domain.meta.MetadataProcessor -import dev.arkbuilders.arklib.domain.preview.PreviewProcessor -import dev.arkbuilders.arklib.domain.score.ScoreStorage -import dev.arkbuilders.arklib.domain.tags.TagStorage +import dev.arkbuilders.arklib.data.index.Resource +import dev.arkbuilders.arklib.data.index.ResourceIndex +import dev.arkbuilders.arklib.data.meta.MetadataProcessor +import dev.arkbuilders.arklib.data.preview.PreviewProcessor +import dev.arkbuilders.arklib.user.score.ScoreStorage +import dev.arkbuilders.arklib.user.tags.TagStorage import java.nio.file.Files import javax.inject.Inject import kotlin.io.path.notExists diff --git a/app/src/main/java/dev/arkbuilders/navigator/presentation/utils/StringProvider.kt b/app/src/main/java/dev/arkbuilders/navigator/presentation/utils/StringProvider.kt index 16694414..3353e6ba 100644 --- a/app/src/main/java/dev/arkbuilders/navigator/presentation/utils/StringProvider.kt +++ b/app/src/main/java/dev/arkbuilders/navigator/presentation/utils/StringProvider.kt @@ -2,7 +2,7 @@ package dev.arkbuilders.navigator.presentation.utils import android.content.Context import androidx.annotation.StringRes -import dev.arkbuilders.arklib.domain.meta.Kind +import dev.arkbuilders.arklib.data.meta.Kind import dev.arkbuilders.navigator.R class StringProvider(private val context: Context) { diff --git a/app/src/main/java/dev/arkbuilders/navigator/presentation/utils/extra/DocumentExtraLoader.kt b/app/src/main/java/dev/arkbuilders/navigator/presentation/utils/extra/DocumentExtraLoader.kt index ae7b5d25..35d8c8f1 100644 --- a/app/src/main/java/dev/arkbuilders/navigator/presentation/utils/extra/DocumentExtraLoader.kt +++ b/app/src/main/java/dev/arkbuilders/navigator/presentation/utils/extra/DocumentExtraLoader.kt @@ -2,7 +2,7 @@ package dev.arkbuilders.navigator.presentation.utils.extra import android.widget.TextView import dev.arkbuilders.navigator.R -import dev.arkbuilders.arklib.domain.meta.Metadata +import dev.arkbuilders.arklib.data.meta.Metadata import dev.arkbuilders.navigator.presentation.utils.textOrGone object DocumentExtraLoader { diff --git a/app/src/main/java/dev/arkbuilders/navigator/presentation/utils/extra/ExtraLoader.kt b/app/src/main/java/dev/arkbuilders/navigator/presentation/utils/extra/ExtraLoader.kt index 166a3d04..dbf4ab80 100644 --- a/app/src/main/java/dev/arkbuilders/navigator/presentation/utils/extra/ExtraLoader.kt +++ b/app/src/main/java/dev/arkbuilders/navigator/presentation/utils/extra/ExtraLoader.kt @@ -1,7 +1,7 @@ package dev.arkbuilders.navigator.presentation.utils.extra import android.widget.TextView -import dev.arkbuilders.arklib.domain.meta.Metadata +import dev.arkbuilders.arklib.data.meta.Metadata import dev.arkbuilders.navigator.presentation.utils.makeGone object ExtraLoader { diff --git a/app/src/main/java/dev/arkbuilders/navigator/presentation/utils/extra/LinkExtraLoader.kt b/app/src/main/java/dev/arkbuilders/navigator/presentation/utils/extra/LinkExtraLoader.kt index 0fab0529..f408f3cc 100644 --- a/app/src/main/java/dev/arkbuilders/navigator/presentation/utils/extra/LinkExtraLoader.kt +++ b/app/src/main/java/dev/arkbuilders/navigator/presentation/utils/extra/LinkExtraLoader.kt @@ -2,7 +2,7 @@ package dev.arkbuilders.navigator.presentation.utils.extra import android.widget.TextView import dev.arkbuilders.navigator.R -import dev.arkbuilders.arklib.domain.meta.Metadata +import dev.arkbuilders.arklib.data.meta.Metadata import dev.arkbuilders.navigator.presentation.utils.textOrGone object LinkExtraLoader { diff --git a/app/src/main/java/dev/arkbuilders/navigator/presentation/utils/extra/VideoExtraLoader.kt b/app/src/main/java/dev/arkbuilders/navigator/presentation/utils/extra/VideoExtraLoader.kt index 36c4ada3..7b7832d5 100644 --- a/app/src/main/java/dev/arkbuilders/navigator/presentation/utils/extra/VideoExtraLoader.kt +++ b/app/src/main/java/dev/arkbuilders/navigator/presentation/utils/extra/VideoExtraLoader.kt @@ -2,7 +2,7 @@ package dev.arkbuilders.navigator.presentation.utils.extra import android.widget.TextView import dev.arkbuilders.navigator.R -import dev.arkbuilders.arklib.domain.meta.Metadata +import dev.arkbuilders.arklib.data.meta.Metadata import dev.arkbuilders.navigator.presentation.utils.textOrGone object VideoExtraLoader { diff --git a/build.gradle b/build.gradle index 09a52db8..3cf6cb60 100644 --- a/build.gradle +++ b/build.gradle @@ -47,5 +47,6 @@ allprojects { maven { url "https://plugins.gradle.org/m2/" } gradlePluginPortal() maven { url 'https://jitpack.io' } + mavenLocal() } }