fix(media_downloader): two images overlay merge

This commit is contained in:
rhunk
2023-09-06 23:02:11 +02:00
parent 2cf172e597
commit 7924d5a445
3 changed files with 9 additions and 6 deletions

View File

@ -7,6 +7,7 @@ data class InputMedia(
val type: DownloadMediaType,
val encryption: MediaEncryptionKeyPair? = null,
val messageContentType: String? = null,
val isOverlay: Boolean = false,
)
class DownloadRequest(

View File

@ -199,7 +199,8 @@ class MediaDownloader : MessagingRuleFeature("MediaDownloader", MessagingRuleTyp
overlay = InputMedia(
overlayReference,
DownloadMediaType.fromUri(Uri.parse(overlayReference)),
overlay.encryption?.toKeyPair()
overlay.encryption?.toKeyPair(),
isOverlay = true
)
)
return
@ -372,7 +373,7 @@ class MediaDownloader : MessagingRuleFeature("MediaDownloader", MessagingRuleTyp
mediaAuthor = storyName
).downloadDashMedia(playlistUrl, 0, null)
}
setPositiveButton("Download") { dialog, which ->
setPositiveButton("Download") { _, _ ->
val groups = mutableListOf<MutableList<SnapChapterInfo>>()
var currentGroup = mutableListOf<SnapChapterInfo>()
var lastChapterIndex = -1