From 17c3d21bcc75c5739ae06ad4230d129839279868 Mon Sep 17 00:00:00 2001 From: Vijay Rajan <105869518+vijayarajan-b-15265@users.noreply.github.com> Date: Tue, 9 Jan 2024 15:47:11 +0530 Subject: [PATCH 1/4] Crash prevention. Fixed swipeDismissHandler uninitialized property issue. Crash prevention by the initialized check. --- .../com/stfalcon/imageviewer/viewer/view/ImageViewerView.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/imageviewer/src/main/java/com/stfalcon/imageviewer/viewer/view/ImageViewerView.kt b/imageviewer/src/main/java/com/stfalcon/imageviewer/viewer/view/ImageViewerView.kt index 796d1d0b..0695a368 100644 --- a/imageviewer/src/main/java/com/stfalcon/imageviewer/viewer/view/ImageViewerView.kt +++ b/imageviewer/src/main/java/com/stfalcon/imageviewer/viewer/view/ImageViewerView.kt @@ -201,8 +201,8 @@ internal class ImageViewerView @JvmOverloads constructor( } internal fun close() { - if (shouldDismissToBottom) { - swipeDismissHandler.initiateDismissToBottom() + if (shouldDismissToBottom && ::swipeDismissHandler.isInitialized) { + swipeDismissHandler.initiateDismissToBottom() } else { animateClose() } @@ -359,4 +359,4 @@ internal class ImageViewerView @JvmOverloads constructor( externalImage = transitionImageView, internalImage = this.transitionImageView, internalImageContainer = this.transitionImageContainer) -} \ No newline at end of file +} From 466ed691b3c1caf6e6c998e9810b9ae0edc7eba0 Mon Sep 17 00:00:00 2001 From: Vijay Rajan <105869518+vijayarajan-b-15265@users.noreply.github.com> Date: Tue, 9 Jan 2024 16:07:06 +0530 Subject: [PATCH 2/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ced22765..7ba3a2fa 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ allprojects { And then add the dependency to the **module `build.gradle`** file: ```gradle -implementation 'com.github.stfalcon-studio:StfalconImageViewer:v1.0.1' +implementation 'com.github.stfalcon-studio:StfalconImageViewer:v1.0.2' ``` Download via **Maven**: From 654e3d736ce63f8a3852fcd7507340360771c6b6 Mon Sep 17 00:00:00 2001 From: vijay-15265 Date: Tue, 9 Jan 2024 21:14:46 +0530 Subject: [PATCH 3/4] Maven related changes. --- README.md | 2 +- imageviewer/build.gradle | 4 ++-- .../com/stfalcon/imageviewer/viewer/view/ImageViewerView.kt | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7ba3a2fa..e0480ad0 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ allprojects { And then add the dependency to the **module `build.gradle`** file: ```gradle -implementation 'com.github.stfalcon-studio:StfalconImageViewer:v1.0.2' +implementation 'com.github.stfalcon-studio:StfalconImageViewer:1.0.2' ``` Download via **Maven**: diff --git a/imageviewer/build.gradle b/imageviewer/build.gradle index aa107849..89e224bd 100644 --- a/imageviewer/build.gradle +++ b/imageviewer/build.gradle @@ -28,9 +28,9 @@ android { from components.release // You can then customize attributes of the publication as shown below. - groupId = 'com.github.stfalcon' + groupId = 'com.github.vijayarajan-b-15265' artifactId = 'stfalcon-imageviewer' - version = '1.0.1' + version = '1.0.2' } } } diff --git a/imageviewer/src/main/java/com/stfalcon/imageviewer/viewer/view/ImageViewerView.kt b/imageviewer/src/main/java/com/stfalcon/imageviewer/viewer/view/ImageViewerView.kt index 0695a368..83a2cccd 100644 --- a/imageviewer/src/main/java/com/stfalcon/imageviewer/viewer/view/ImageViewerView.kt +++ b/imageviewer/src/main/java/com/stfalcon/imageviewer/viewer/view/ImageViewerView.kt @@ -201,8 +201,8 @@ internal class ImageViewerView @JvmOverloads constructor( } internal fun close() { - if (shouldDismissToBottom && ::swipeDismissHandler.isInitialized) { - swipeDismissHandler.initiateDismissToBottom() + if (shouldDismissToBottom && ::swipeDismissHandler.isInitialized) { + swipeDismissHandler.initiateDismissToBottom() } else { animateClose() } From 90ba77c7e0e02211742a3335b43b4b3e401c36b9 Mon Sep 17 00:00:00 2001 From: vijay-15265 Date: Tue, 9 Jan 2024 21:34:32 +0530 Subject: [PATCH 4/4] Just the Crash fix and Version incremented for new release. --- imageviewer/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imageviewer/build.gradle b/imageviewer/build.gradle index 89e224bd..517d73e2 100644 --- a/imageviewer/build.gradle +++ b/imageviewer/build.gradle @@ -28,7 +28,7 @@ android { from components.release // You can then customize attributes of the publication as shown below. - groupId = 'com.github.vijayarajan-b-15265' + groupId = 'com.github.stfalcon' artifactId = 'stfalcon-imageviewer' version = '1.0.2' }