mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-07 01:10:09 +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 {
|
public convenience init(from decoder: Decoder) throws {
|
||||||
let values = try decoder.container(keyedBy: CodingKeys.self)
|
let values = try decoder.container(keyedBy: CodingKeys.self)
|
||||||
let codingPath = decoder.codingPath.map { $0.stringValue }.joined(separator: ".")
|
|
||||||
|
|
||||||
let freePlainInputField: PresentationInputFieldTheme
|
let freePlainInputField: PresentationInputFieldTheme
|
||||||
if let value = try? values.decode(PresentationInputFieldTheme.self, forKey: .freePlainInputField) {
|
if let value = try? values.decode(PresentationInputFieldTheme.self, forKey: .freePlainInputField) {
|
||||||
@ -863,7 +862,7 @@ extension PresentationThemeList: Codable {
|
|||||||
|
|
||||||
self.init(
|
self.init(
|
||||||
blocksBackgroundColor: try decodeColor(values, .blocksBg),
|
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),
|
plainBackgroundColor: try decodeColor(values, .plainBg),
|
||||||
itemPrimaryTextColor: try decodeColor(values, .primaryText),
|
itemPrimaryTextColor: try decodeColor(values, .primaryText),
|
||||||
itemSecondaryTextColor: try decodeColor(values, .secondaryText),
|
itemSecondaryTextColor: try decodeColor(values, .secondaryText),
|
||||||
@ -873,7 +872,7 @@ extension PresentationThemeList: Codable {
|
|||||||
itemDestructiveColor: try decodeColor(values, .destructive),
|
itemDestructiveColor: try decodeColor(values, .destructive),
|
||||||
itemPlaceholderTextColor: try decodeColor(values, .placeholderText),
|
itemPlaceholderTextColor: try decodeColor(values, .placeholderText),
|
||||||
itemBlocksBackgroundColor: try decodeColor(values, .itemBlocksBg),
|
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),
|
itemHighlightedBackgroundColor: try decodeColor(values, .itemHighlightedBg),
|
||||||
itemBlocksSeparatorColor: try decodeColor(values, .blocksSeparator),
|
itemBlocksSeparatorColor: try decodeColor(values, .blocksSeparator),
|
||||||
itemPlainSeparatorColor: try decodeColor(values, .plainSeparator),
|
itemPlainSeparatorColor: try decodeColor(values, .plainSeparator),
|
||||||
|
|||||||
@ -696,11 +696,17 @@ func openExternalUrlImpl(context: AccountContext, urlContext: OpenURLContext, ur
|
|||||||
}
|
}
|
||||||
} else if let attach = attach {
|
} else if let attach = attach {
|
||||||
result += "?attach=\(attach)"
|
result += "?attach=\(attach)"
|
||||||
} else if let startAttach = startAttach {
|
}
|
||||||
if !startAttach.isEmpty {
|
if let startAttach = startAttach {
|
||||||
result += "?startattach=\(startAttach)"
|
if attach == nil {
|
||||||
|
result += "?"
|
||||||
} else {
|
} else {
|
||||||
result += "?startattach"
|
result += "&"
|
||||||
|
}
|
||||||
|
if !startAttach.isEmpty {
|
||||||
|
result += "startattach=\(startAttach)"
|
||||||
|
} else {
|
||||||
|
result += "startattach"
|
||||||
}
|
}
|
||||||
if let choose = choose {
|
if let choose = choose {
|
||||||
result += "&choose=\(choose)"
|
result += "&choose=\(choose)"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user