Skip to content

Commit f7d27eb

Browse files
fix: handle image+video intents properly in MediaActivity (#602)
* Fix returned media for image+video intent With both image and video to true, it only showed GIFs * Update CHANGELOG.md Co-authored-by: Naveen Singh <36371707+naveensingh@users.noreply.github.com> --------- Co-authored-by: Naveen Singh <36371707+naveensingh@users.noreply.github.com>
1 parent c970049 commit f7d27eb

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
### Fixed
9+
- Fixed media picker showing only GIFs when both images and videos are requested
810

911
## [1.4.1] - 2025-07-22
1012
### Changed

app/src/main/kotlin/org/fossify/gallery/activities/MediaActivity.kt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,11 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
660660
if (mLoadedInitialPhotos) {
661661
startAsyncTask()
662662
} else {
663-
getCachedMedia(mPath, mIsGetVideoIntent, mIsGetImageIntent) {
663+
getCachedMedia(
664+
mPath,
665+
mIsGetVideoIntent && !mIsGetImageIntent,
666+
mIsGetImageIntent && !mIsGetVideoIntent
667+
) {
664668
if (it.isEmpty()) {
665669
runOnUiThread {
666670
binding.mediaRefreshLayout.isRefreshing = true
@@ -680,8 +684,8 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
680684
mCurrAsyncTask = GetMediaAsynctask(
681685
context = applicationContext,
682686
mPath = mPath,
683-
isPickImage = mIsGetImageIntent,
684-
isPickVideo = mIsGetVideoIntent,
687+
isPickImage = mIsGetImageIntent && !mIsGetVideoIntent,
688+
isPickVideo = mIsGetVideoIntent && !mIsGetImageIntent,
685689
showAll = mShowAll
686690
) {
687691
ensureBackgroundThread {

0 commit comments

Comments
 (0)