mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-09 03:20:48 +00:00
Fix video chapter title
This commit is contained in:
parent
02d46a8751
commit
f6e83ca5b1
@ -171,7 +171,7 @@ final class ChatVideoGalleryItemScrubberView: UIView {
|
||||
if let mappedStatus = mappedStatus {
|
||||
self.chapterDisposable.set((mappedStatus
|
||||
|> deliverOnMainQueue).start(next: { [weak self] status in
|
||||
if let strongSelf = self, status.duration > 1.0 {
|
||||
if let strongSelf = self, status.duration > 1.0, strongSelf.chapters.count > 0 {
|
||||
var text: String = ""
|
||||
|
||||
for chapter in strongSelf.chapters {
|
||||
@ -230,7 +230,7 @@ final class ChatVideoGalleryItemScrubberView: UIView {
|
||||
if let fetchStatus = fetchStatus {
|
||||
self.fetchStatusDisposable.set((fetchStatus
|
||||
|> deliverOnMainQueue).start(next: { [weak self] status in
|
||||
if let strongSelf = self {
|
||||
if let strongSelf = self, strongSelf.chapters.isEmpty {
|
||||
var text: String
|
||||
switch status {
|
||||
case .Remote:
|
||||
@ -247,10 +247,10 @@ final class ChatVideoGalleryItemScrubberView: UIView {
|
||||
}
|
||||
}
|
||||
}))
|
||||
} else {
|
||||
} else if self.chapters.isEmpty {
|
||||
self.infoNode.attributedText = NSAttributedString(string: dataSizeString(fileSize, forceDecimal: true, formatting: formatting), font: textFont, textColor: .white)
|
||||
}
|
||||
} else {
|
||||
} else if self.chapters.isEmpty {
|
||||
self.infoNode.attributedText = nil
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user