Merge branch 'master' into experimental-2

This commit is contained in:
Ali
2020-08-28 17:32:25 +01:00
14 changed files with 217 additions and 85 deletions

View File

@@ -412,7 +412,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)