mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
addition check for file status
This commit is contained in:
parent
021f3c57b3
commit
c83214ebe6
1 changed files with 2 additions and 0 deletions
|
|
@ -397,6 +397,8 @@ public final class MediaBox {
|
|||
let paths = self.storePathsForId(resource.id)
|
||||
if let _ = fileSize(paths.complete) {
|
||||
subscriber.putNext(.single(.Local))
|
||||
} else if let size = fileSize(paths.partial), size == resource.size {
|
||||
subscriber.putNext(.single(.Local))
|
||||
} else {
|
||||
subscriber.putNext(.single(.Remote) |> then(signal))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue