From e5c4830ab5a4bb33b9d34f625736de468d23fe8f Mon Sep 17 00:00:00 2001 From: Zakir Sheikh Date: Fri, 16 Aug 2024 11:57:35 +0530 Subject: [PATCH] [CHORE] Various updates and enhancements: - Bumped multiple library versions, including Compose to RC1 and Gradle to 8.6.0. - Changed accent color in light theme to SkyBlue. - Added `CoinInitializer` for Coil library initialization and custom `ThumbnailFetcher` for faster image fetching. - Refactored `compose-ktx` module to `foundation` and 'api' to 'domain' for better clarity. - Renamed `preview` package to `viewer`. [FEAT] Introduced `renderInSharedTransitionScopeOverlay` in `AppTheme` for handling views in shared element transitions. [FEAT] Added 'MenuItem' & 'Menu' components to `foundation` for easier dynamic menu creation. --- .idea/.name | 1 + .idea/appInsightsSettings.xml | 1 + .idea/gradle.xml | 4 +- .idea/kotlinc.xml | 9 +- app/build.gradle.kts | 10 +- app/src/main/AndroidManifest.xml | 11 +- app/src/main/java/com/zs/gallery/Home.kt | 62 ++-- .../main/java/com/zs/gallery/MainActivity.kt | 10 +- app/src/main/java/com/zs/gallery/bin/Trash.kt | 14 +- .../main/java/com/zs/gallery/bin/TrashItem.kt | 12 +- .../java/com/zs/gallery/bin/TrashViewState.kt | 2 +- .../java/com/zs/gallery/common/FileActions.kt | 2 +- .../zs/gallery/common/FloatingActionMenu.kt | 2 +- .../java/com/zs/gallery/common/MediaFile.kt | 12 +- .../main/java/com/zs/gallery/common/Route.kt | 2 +- .../com/zs/gallery/common/SystemFacade.kt | 4 +- .../com/zs/gallery/common/ThumbnailFetcher.kt | 211 +++++++++++ .../java/com/zs/gallery/common/extensions.kt | 12 +- .../java/com/zs/gallery/common/lazy-ktx.kt | 2 +- .../main/java/com/zs/gallery/files/Album.kt | 18 +- .../main/java/com/zs/gallery/files/Folder.kt | 33 +- .../java/com/zs/gallery/files/Timeline.kt | 23 +- .../java/com/zs/gallery/files/ViewState.kt | 3 +- .../java/com/zs/gallery/folders/Folder.kt | 15 +- .../java/com/zs/gallery/folders/Folders.kt | 12 +- .../zs/gallery/folders/FoldersViewState.kt | 2 +- .../com/zs/gallery/impl/AlbumViewModel.kt | 2 +- .../com/zs/gallery/impl/FolderViewModel.kt | 6 +- .../com/zs/gallery/impl/FoldersViewModel.kt | 4 +- .../java/com/zs/gallery/impl/Initializer.kt | 23 +- .../java/com/zs/gallery/impl/KoinViewModel.kt | 8 +- .../java/com/zs/gallery/impl/MainViewModel.kt | 6 +- .../com/zs/gallery/impl/TimelineViewModel.kt | 30 +- .../com/zs/gallery/impl/TrashViewModel.kt | 7 +- .../com/zs/gallery/impl/ViewerViewModel.kt | 140 +++++-- .../java/com/zs/gallery/preview/Viewer.kt | 184 ---------- .../java/com/zs/gallery/settings/Settings.kt | 8 +- .../main/java/com/zs/gallery/viewer/Viewer.kt | 342 ++++++++++++++++++ .../{preview => viewer}/ViewerViewState.kt | 83 +++-- app/src/main/res/values/strings.xml | 10 +- {api => domain}/.gitignore | 0 {api => domain}/build.gradle.kts | 3 +- {api => domain}/consumer-rules.pro | 0 {api => domain}/proguard-rules.pro | 0 .../com/zs/domain}/ExampleInstrumentedTest.kt | 4 +- {api => domain}/src/main/AndroidManifest.xml | 0 .../main/java/com/zs/domain}/store/Folder.kt | 4 +- .../java/com/zs/domain}/store/MediaFile.kt | 10 +- .../com/zs/domain}/store/MediaProvider.kt | 9 +- .../com/zs/domain}/store/MediaProviderImpl.kt | 40 +- .../java/com/zs/domain/store/Properties.kt | 16 + .../main/java/com/zs/domain}/store/Trashed.kt | 2 +- .../java/com/zs/domain}/store/resolver-ktx.kt | 2 +- .../main/java/com/zs/domain}/util/PathUtil.kt | 3 +- .../src/main/java/com/zs/domain}/util/Util.kt | 2 +- .../java/com/zs/domain}/ExampleUnitTest.kt | 2 +- {compose-ktx => foundation}/.gitignore | 0 {compose-ktx => foundation}/build.gradle.kts | 2 +- .../consumer-rules.pro | 0 .../proguard-rules.pro | 0 .../zs/foundation}/ExampleInstrumentedTest.kt | 4 +- .../src/main/AndroidManifest.xml | 0 .../main/java/com/zs/foundation}/AppTheme.kt | 105 +++--- .../main/java/com/zs/foundation}/Delegates.kt | 7 +- .../main/java/com/zs/foundation}/Divider.kt | 16 +- .../java/com/zs/foundation}/PagerIndicator.kt | 2 +- .../src/main/java/com/zs/foundation}/Utils.kt | 2 +- .../java/com/zs/foundation}/WindowSize.kt | 2 +- .../zs/foundation}/adaptive/NavigationItem.kt | 4 +- .../adaptive/NavigationSuiteScaffold.kt | 6 +- .../com/zs/foundation}/adaptive/TwoPane.kt | 4 +- .../foundation}/adaptive/TwoPaneStrategy.kt | 2 +- .../com/zs/foundation}/effect/Highlight.kt | 2 +- .../java/com/zs/foundation}/effect/Shimmer.kt | 2 +- .../main/java/com/zs/foundation/menu/Menu.kt | 78 ++++ .../java/com/zs/foundation/menu/MenuItem.kt | 90 +++++ .../java/com/zs/foundation}/shapes/Folder.kt | 2 +- .../java/com/zs/foundation}/toast/Helpers.kt | 2 +- .../java/com/zs/foundation}/toast/Toast.kt | 8 +- .../zs/foundation}/toast/ToastHostState.kt | 2 +- .../com/zs/foundation}/ExampleUnitTest.kt | 2 +- gradle/libs.versions.toml | 15 +- settings.gradle.kts | 4 +- 83 files changed, 1209 insertions(+), 593 deletions(-) create mode 100644 .idea/.name create mode 100644 app/src/main/java/com/zs/gallery/common/ThumbnailFetcher.kt delete mode 100644 app/src/main/java/com/zs/gallery/preview/Viewer.kt create mode 100644 app/src/main/java/com/zs/gallery/viewer/Viewer.kt rename app/src/main/java/com/zs/gallery/{preview => viewer}/ViewerViewState.kt (63%) rename {api => domain}/.gitignore (100%) rename {api => domain}/build.gradle.kts (91%) rename {api => domain}/consumer-rules.pro (100%) rename {api => domain}/proguard-rules.pro (100%) rename {api/src/androidTest/java/com/zs/api => domain/src/androidTest/java/com/zs/domain}/ExampleInstrumentedTest.kt (86%) rename {api => domain}/src/main/AndroidManifest.xml (100%) rename {api/src/main/java/com/zs/api => domain/src/main/java/com/zs/domain}/store/Folder.kt (94%) rename {api/src/main/java/com/zs/api => domain/src/main/java/com/zs/domain}/store/MediaFile.kt (88%) rename {api/src/main/java/com/zs/api => domain/src/main/java/com/zs/domain}/store/MediaProvider.kt (98%) rename {api/src/main/java/com/zs/api => domain/src/main/java/com/zs/domain}/store/MediaProviderImpl.kt (94%) create mode 100644 domain/src/main/java/com/zs/domain/store/Properties.kt rename {api/src/main/java/com/zs/api => domain/src/main/java/com/zs/domain}/store/Trashed.kt (98%) rename {api/src/main/java/com/zs/api => domain/src/main/java/com/zs/domain}/store/resolver-ktx.kt (99%) rename {api/src/main/java/com/zs/api => domain/src/main/java/com/zs/domain}/util/PathUtil.kt (97%) rename {api/src/main/java/com/zs/api => domain/src/main/java/com/zs/domain}/util/Util.kt (98%) rename {api/src/test/java/com/zs/api => domain/src/test/java/com/zs/domain}/ExampleUnitTest.kt (93%) rename {compose-ktx => foundation}/.gitignore (100%) rename {compose-ktx => foundation}/build.gradle.kts (97%) rename {compose-ktx => foundation}/consumer-rules.pro (100%) rename {compose-ktx => foundation}/proguard-rules.pro (100%) rename {compose-ktx/src/androidTest/java/com/zs/compose_ktx => foundation/src/androidTest/java/com/zs/foundation}/ExampleInstrumentedTest.kt (85%) rename {compose-ktx => foundation}/src/main/AndroidManifest.xml (100%) rename {compose-ktx/src/main/java/com/zs/compose_ktx => foundation/src/main/java/com/zs/foundation}/AppTheme.kt (89%) rename {compose-ktx/src/main/java/com/zs/compose_ktx => foundation/src/main/java/com/zs/foundation}/Delegates.kt (97%) rename {compose-ktx/src/main/java/com/zs/compose_ktx => foundation/src/main/java/com/zs/foundation}/Divider.kt (79%) rename {compose-ktx/src/main/java/com/zs/compose_ktx => foundation/src/main/java/com/zs/foundation}/PagerIndicator.kt (99%) rename {compose-ktx/src/main/java/com/zs/compose_ktx => foundation/src/main/java/com/zs/foundation}/Utils.kt (97%) rename {compose-ktx/src/main/java/com/zs/compose_ktx => foundation/src/main/java/com/zs/foundation}/WindowSize.kt (99%) rename {compose-ktx/src/main/java/com/zs/compose_ktx => foundation/src/main/java/com/zs/foundation}/adaptive/NavigationItem.kt (99%) rename {compose-ktx/src/main/java/com/zs/compose_ktx => foundation/src/main/java/com/zs/foundation}/adaptive/NavigationSuiteScaffold.kt (98%) rename {compose-ktx/src/main/java/com/zs/compose_ktx => foundation/src/main/java/com/zs/foundation}/adaptive/TwoPane.kt (99%) rename {compose-ktx/src/main/java/com/zs/compose_ktx => foundation/src/main/java/com/zs/foundation}/adaptive/TwoPaneStrategy.kt (99%) rename {compose-ktx/src/main/java/com/zs/compose_ktx => foundation/src/main/java/com/zs/foundation}/effect/Highlight.kt (99%) rename {compose-ktx/src/main/java/com/zs/compose_ktx => foundation/src/main/java/com/zs/foundation}/effect/Shimmer.kt (99%) create mode 100644 foundation/src/main/java/com/zs/foundation/menu/Menu.kt create mode 100644 foundation/src/main/java/com/zs/foundation/menu/MenuItem.kt rename {compose-ktx/src/main/java/com/zs/compose_ktx => foundation/src/main/java/com/zs/foundation}/shapes/Folder.kt (97%) rename {compose-ktx/src/main/java/com/zs/compose_ktx => foundation/src/main/java/com/zs/foundation}/toast/Helpers.kt (99%) rename {compose-ktx/src/main/java/com/zs/compose_ktx => foundation/src/main/java/com/zs/foundation}/toast/Toast.kt (96%) rename {compose-ktx/src/main/java/com/zs/compose_ktx => foundation/src/main/java/com/zs/foundation}/toast/ToastHostState.kt (99%) rename {compose-ktx/src/test/java/com/zs/compose_ktx => foundation/src/test/java/com/zs/foundation}/ExampleUnitTest.kt (92%) diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000..62321e8 --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +Gallery \ No newline at end of file diff --git a/.idea/appInsightsSettings.xml b/.idea/appInsightsSettings.xml index b3367cd..8a2f92b 100644 --- a/.idea/appInsightsSettings.xml +++ b/.idea/appInsightsSettings.xml @@ -1,6 +1,7 @@ +