mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix startattach
This commit is contained in:
parent
751432c273
commit
6566fc1822
@ -850,7 +850,6 @@ extension PresentationThemeList: Codable {
|
||||
|
||||
public convenience init(from decoder: Decoder) throws {
|
||||
let values = try decoder.container(keyedBy: CodingKeys.self)
|
||||
let codingPath = decoder.codingPath.map { $0.stringValue }.joined(separator: ".")
|
||||
|
||||
let freePlainInputField: PresentationInputFieldTheme
|
||||
if let value = try? values.decode(PresentationInputFieldTheme.self, forKey: .freePlainInputField) {
|
||||
@ -863,7 +862,7 @@ extension PresentationThemeList: Codable {
|
||||
|
||||
self.init(
|
||||
blocksBackgroundColor: try decodeColor(values, .blocksBg),
|
||||
modalBlocksBackgroundColor: try decodeColor(values, .modalBlocksBg, fallbackKey: "\(codingPath).blocksBg"),
|
||||
modalBlocksBackgroundColor: try decodeColor(values, .modalBlocksBg, decoder: decoder, fallbackKey: "list.blocksBg"),
|
||||
plainBackgroundColor: try decodeColor(values, .plainBg),
|
||||
itemPrimaryTextColor: try decodeColor(values, .primaryText),
|
||||
itemSecondaryTextColor: try decodeColor(values, .secondaryText),
|
||||
@ -873,7 +872,7 @@ extension PresentationThemeList: Codable {
|
||||
itemDestructiveColor: try decodeColor(values, .destructive),
|
||||
itemPlaceholderTextColor: try decodeColor(values, .placeholderText),
|
||||
itemBlocksBackgroundColor: try decodeColor(values, .itemBlocksBg),
|
||||
itemModalBlocksBackgroundColor: try decodeColor(values, .itemModalBlocksBg, fallbackKey: "\(codingPath).itemBlocksBg"),
|
||||
itemModalBlocksBackgroundColor: try decodeColor(values, .itemModalBlocksBg, decoder: decoder, fallbackKey: "list.itemBlocksBg"),
|
||||
itemHighlightedBackgroundColor: try decodeColor(values, .itemHighlightedBg),
|
||||
itemBlocksSeparatorColor: try decodeColor(values, .blocksSeparator),
|
||||
itemPlainSeparatorColor: try decodeColor(values, .plainSeparator),
|
||||
|
@ -696,11 +696,17 @@ func openExternalUrlImpl(context: AccountContext, urlContext: OpenURLContext, ur
|
||||
}
|
||||
} else if let attach = attach {
|
||||
result += "?attach=\(attach)"
|
||||
} else if let startAttach = startAttach {
|
||||
if !startAttach.isEmpty {
|
||||
result += "?startattach=\(startAttach)"
|
||||
}
|
||||
if let startAttach = startAttach {
|
||||
if attach == nil {
|
||||
result += "?"
|
||||
} else {
|
||||
result += "?startattach"
|
||||
result += "&"
|
||||
}
|
||||
if !startAttach.isEmpty {
|
||||
result += "startattach=\(startAttach)"
|
||||
} else {
|
||||
result += "startattach"
|
||||
}
|
||||
if let choose = choose {
|
||||
result += "&choose=\(choose)"
|
||||
|
Loading…
x
Reference in New Issue
Block a user