Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
1e9898c
feat(chat): Group files uploaded together into one album message
mahibi Aug 26, 2026
2bdfabc
fix(chat): Group files immediately while they are still uploading
mahibi Aug 26, 2026
25eaf47
fix(chat): Stop the generic-icon flash when a grouped upload syncs
mahibi Aug 26, 2026
530c7c6
fix(chat): Stop the generic icon overlaying the uploaded image
mahibi Aug 26, 2026
97c3d6f
fix(chat): Fix crash from duplicate keys when a batch upload fails
mahibi Aug 26, 2026
1056695
fix(uploads): Don't crash when a picked file's uri access is revoked
mahibi Aug 26, 2026
dc6c791
fix(chat): Fix cancel doing nothing for uploads from a prior session
mahibi Aug 26, 2026
e0c4b07
feat(chat): Add a swipeable, group-aware media viewer
mahibi Aug 26, 2026
18ee6d3
fix(mediaviewer): Remove the swipe-to-close gesture from the viewer
mahibi Aug 26, 2026
c927c66
fix(mediaviewer): Only autoplay the video the viewer was opened on
mahibi Aug 26, 2026
7575125
fix(mediaviewer): Properly center the current thumbnail in the strip
mahibi Aug 26, 2026
72d73c7
feat(mediaviewer): Tap the shown item to toggle top bar and strip
mahibi Aug 26, 2026
7a2383c
fix(mediaviewer): Fade controls in/out instead of sliding sideways
mahibi Aug 26, 2026
a09a2cf
fix(mediaviewer): Keep the video's own controller clear of the strip
mahibi Aug 26, 2026
73a8ffa
feat(mediaviewer): Show sent date/time as an app bar subtitle
mahibi Aug 26, 2026
eb3b8c6
fix(chat): Give grouped media the same border as single images
mahibi Aug 26, 2026
80182d3
fix(mediaviewer): Make the top app bar semi-transparent
mahibi Aug 26, 2026
7ce9139
feat(mediaviewer): Toggle the status/nav bars along with the controls
mahibi Aug 26, 2026
8a424ab
feat(mediaviewer): Migrate Shared Items gallery to the swipeable view…
mahibi Aug 26, 2026
569bda5
refactor(mediaviewer): Remove FullScreenImageActivity, now fully repl…
mahibi Aug 26, 2026
48db8b3
format code
mahibi Aug 26, 2026
231524d
fix(mediaviewer): Exclude non-image/video files from the chat-seeded …
mahibi Aug 26, 2026
0e3f871
fix(mediaviewer): Silence ReturnCount finding in toMediaViewerItem
mahibi Aug 26, 2026
3b61dbb
fix(mediaviewer): Cap the media viewer seed to avoid TransactionTooLa…
mahibi Aug 26, 2026
6e5344f
fix(mediaviewer): Show sticky date header for grouped media items
mahibi Aug 27, 2026
73ef991
simplify date handling for stickyHeader
mahibi Aug 27, 2026
da1b63c
fix(mediaviewer): Stop stale spinner and video-source mismatch on swipe
mahibi Aug 27, 2026
a9d1533
drop usage of referenceId as stableKey (fix IllegalArgumentException …
mahibi Aug 27, 2026
5f8b508
fix(chat): Open media viewer for images/videos regardless of exact mi…
mahibi Aug 27, 2026
39acc35
fix(chat): Mark grouped media messages as read
mahibi Aug 27, 2026
9c1be99
fix(mediaviewer): Keep the thumbnail strip clear of the navigation bar
AndyScherzinger Aug 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,6 @@
android:taskAffinity=".call"
android:theme="@style/AppTheme.CallLauncher" />

<activity
android:name=".fullscreenfile.FullScreenImageActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:theme="@style/FullScreenImageTheme" />

<activity
android:name=".fullscreenfile.FullScreenMediaActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
Expand All @@ -226,6 +221,11 @@
android:configChanges="orientation|keyboardHidden|screenSize"
android:theme="@style/FullScreenTextTheme" />

<activity
android:name=".mediaviewer.activities.MediaViewerActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:theme="@style/FullScreenImageTheme" />

<activity
android:name=".shareditems.activities.SharedItemsActivity"
android:theme="@style/AppTheme" />
Expand Down
39 changes: 31 additions & 8 deletions app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ import com.nextcloud.talk.jobs.DownloadFileToCacheWorker
import com.nextcloud.talk.jobs.ShareOperationWorker
import com.nextcloud.talk.jobs.UploadAndShareFilesWorker
import com.nextcloud.talk.location.LocationPickerActivity
import com.nextcloud.talk.mediaviewer.activities.MediaViewerActivity
import com.nextcloud.talk.mediaviewer.model.capSeedAroundMessage
import com.nextcloud.talk.models.ExternalSignalingServer
import com.nextcloud.talk.models.domain.ConversationModel
import com.nextcloud.talk.models.json.capabilities.SpreedCapability
Expand Down Expand Up @@ -251,6 +253,7 @@ import java.time.ZoneId
import java.time.ZonedDateTime
import java.util.Date
import java.util.Locale
import java.util.UUID
import java.util.concurrent.ExecutionException
import javax.inject.Inject
import java.util.concurrent.CancellationException
Expand Down Expand Up @@ -1285,11 +1288,24 @@ class ChatActivity :
) {
lifecycleScope.launch {
val chatMessage = chatViewModel.getMessageById(messageId.toLong()).first()
FileViewerUtils(this@ChatActivity, conversationUser).openFile(
chatMessage,
openWhenDownloadState,
downloadState
)
val mimetype = chatMessage.fileParameters.mimetype
val fileViewerUtils = FileViewerUtils(this@ChatActivity, conversationUser)

val isViewableMedia = mimetype.startsWith(Mimetype.IMAGE_PREFIX) ||
mimetype.startsWith(Mimetype.VIDEO_PREFIX)
val seedItems = if (isViewableMedia) {
chatViewModel.mediaViewerSeed().flatMap { it.items }.capSeedAroundMessage(messageId.toLong())
} else {
emptyList()
}

if (isViewableMedia && seedItems.any { it.messageId == messageId.toLong() }) {
startActivity(
MediaViewerActivity.newIntent(this@ChatActivity, roomToken, seedItems, messageId.toLong())
)
} else {
fileViewerUtils.openFile(chatMessage, openWhenDownloadState, downloadState)
}
}
}

Expand Down Expand Up @@ -2760,6 +2776,7 @@ class ChatActivity :
}

private fun uploadFiles(files: MutableList<String>, caption: String = "", compressImages: Boolean = false) {
val uploadId = UUID.randomUUID().toString()
for (i in 0 until files.size) {
uploadFile(
fileUri = files[i],
Expand All @@ -2768,7 +2785,9 @@ class ChatActivity :
roomToken = roomToken,
replyToMessageId = getReplyToMessageId(),
displayName = currentConversation?.displayName!!,
compressImages = compressImages
compressImages = compressImages,
uploadId = uploadId,
order = i + 1
)
}
}
Expand Down Expand Up @@ -4155,7 +4174,9 @@ class ChatActivity :
roomToken: String = "",
replyToMessageId: Int? = null,
displayName: String,
compressImages: Boolean = false
compressImages: Boolean = false,
uploadId: String? = null,
order: Int = 1
) {
chatViewModel.uploadFile(
fileUri,
Expand All @@ -4164,7 +4185,9 @@ class ChatActivity :
roomToken,
replyToMessageId,
displayName,
compressImages
compressImages,
uploadId,
order
)
cancelReply()
}
Expand Down
Loading
Loading