mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Fix log path [nocache]
This commit is contained in:
@@ -414,7 +414,12 @@ func contextMenuForChatPresentationIntefaceState(chatPresentationInterfaceState:
|
||||
let logsPath = callLogsPath(account: context.account)
|
||||
let logPath = logsPath + "/" + logName
|
||||
let start = logName.index(logName.startIndex, offsetBy: "\(id)".count + 1)
|
||||
let end = logName.index(logName.endIndex, offsetBy: -4 - 5)
|
||||
let end: String.Index
|
||||
if logName.hasSuffix(".log.json") {
|
||||
end = logName.index(logName.endIndex, offsetBy: -4 - 5)
|
||||
} else {
|
||||
end = logName.index(logName.endIndex, offsetBy: -4)
|
||||
}
|
||||
let accessHash = logName[start..<end]
|
||||
if let accessHash = Int64(accessHash) {
|
||||
callId = CallId(id: id, accessHash: accessHash)
|
||||
|
||||
Reference in New Issue
Block a user