Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios

This commit is contained in:
Ilya Laktyushin 2023-11-02 17:10:24 +04:00
commit 4818fca718
12 changed files with 6 additions and 2 deletions

View File

@ -167,10 +167,10 @@ public final class MediaPlayerTimeTextNode: ASDisplayNode {
}
switch self.mode {
case .normal:
let timestamp = Int32(timestampSeconds)
let timestamp = Int32(truncatingIfNeeded: Int64(floor(timestampSeconds)))
self.state = MediaPlayerTimeTextNodeState(hours: timestamp / (60 * 60), minutes: timestamp % (60 * 60) / 60, seconds: timestamp % 60)
case .reversed:
let timestamp = abs(Int32(timestampSeconds - statusValue.duration))
let timestamp = abs(Int32(Int32(truncatingIfNeeded: Int64(floor(timestampSeconds - statusValue.duration)))))
self.state = MediaPlayerTimeTextNodeState(hours: timestamp / (60 * 60), minutes: timestamp % (60 * 60) / 60, seconds: timestamp % 60)
}
} else if let defaultDuration = self.defaultDuration {

View File

@ -439,6 +439,7 @@ public final class ChatMessageInteractiveFileNode: ASDisplayNode {
guard let strongSelf = self else {
return
}
strongSelf.transcribeDisposable?.dispose()
strongSelf.transcribeDisposable = nil
})
} else {
@ -447,6 +448,7 @@ public final class ChatMessageInteractiveFileNode: ASDisplayNode {
guard let strongSelf = self else {
return
}
strongSelf.transcribeDisposable?.dispose()
strongSelf.transcribeDisposable = nil
})
}

View File

@ -198,6 +198,7 @@ public class ChatMessageInteractiveInstantVideoNode: ASDisplayNode {
self.playbackStatusDisposable.dispose()
self.playerStatusDisposable.dispose()
self.fetchedThumbnailDisposable.dispose()
self.transcribeDisposable?.dispose()
}
override public func didLoad() {
@ -1670,6 +1671,7 @@ public class ChatMessageInteractiveInstantVideoNode: ASDisplayNode {
guard let strongSelf = self else {
return
}
strongSelf.transcribeDisposable?.dispose()
strongSelf.transcribeDisposable = nil
})
}