mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-30 03:44:18 +00:00
no message
This commit is contained in:
parent
92b501ae13
commit
f45ddf449d
@ -328,7 +328,7 @@ final class ChatMessageInteractiveMediaNode: ASDisplayNode {
|
|||||||
if statusUpdated {
|
if statusUpdated {
|
||||||
if let image = media as? TelegramMediaImage {
|
if let image = media as? TelegramMediaImage {
|
||||||
if message.flags.isSending {
|
if message.flags.isSending {
|
||||||
updatedStatusSignal = combineLatest(chatMessagePhotoStatus(account: account, photoReference: .message(message: MessageReference(message), media: image)), account.pendingMessageManager.pendingMessageStatus(message.id))
|
updatedStatusSignal = combineLatest(chatMessagePhotoStatus(account: account, messageId: message.id, photoReference: .message(message: MessageReference(message), media: image)), account.pendingMessageManager.pendingMessageStatus(message.id))
|
||||||
|> map { resourceStatus, pendingStatus -> MediaResourceStatus in
|
|> map { resourceStatus, pendingStatus -> MediaResourceStatus in
|
||||||
if let pendingStatus = pendingStatus {
|
if let pendingStatus = pendingStatus {
|
||||||
var progress = pendingStatus.progress
|
var progress = pendingStatus.progress
|
||||||
@ -341,7 +341,7 @@ final class ChatMessageInteractiveMediaNode: ASDisplayNode {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
updatedStatusSignal = chatMessagePhotoStatus(account: account, photoReference: .message(message: MessageReference(message), media: image))
|
updatedStatusSignal = chatMessagePhotoStatus(account: account, messageId: message.id, photoReference: .message(message: MessageReference(message), media: image))
|
||||||
}
|
}
|
||||||
} else if let file = media as? TelegramMediaFile {
|
} else if let file = media as? TelegramMediaFile {
|
||||||
updatedStatusSignal = combineLatest(messageMediaFileStatus(account: account, messageId: message.id, file: file), account.pendingMessageManager.pendingMessageStatus(message.id))
|
updatedStatusSignal = combineLatest(messageMediaFileStatus(account: account, messageId: message.id, file: file), account.pendingMessageManager.pendingMessageStatus(message.id))
|
||||||
|
|||||||
@ -1424,9 +1424,9 @@ func internalMediaGridMessageVideo(postbox: Postbox, videoReference: FileMediaRe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func chatMessagePhotoStatus(account: Account, photoReference: ImageMediaReference) -> Signal<MediaResourceStatus, NoError> {
|
func chatMessagePhotoStatus(account: Account, messageId: MessageId, photoReference: ImageMediaReference) -> Signal<MediaResourceStatus, NoError> {
|
||||||
if let largestRepresentation = largestRepresentationForPhoto(photoReference.media) {
|
if let largestRepresentation = largestRepresentationForPhoto(photoReference.media) {
|
||||||
return account.postbox.mediaBox.resourceStatus(largestRepresentation.resource)
|
return account.telegramApplicationContext.fetchManager.fetchStatus(category: .image, location: .chat(messageId.peerId), locationKey: .messageId(messageId), resource: largestRepresentation.resource)
|
||||||
} else {
|
} else {
|
||||||
return .never()
|
return .never()
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user