Various Fixes

This commit is contained in:
Ilya Laktyushin 2021-10-29 00:16:32 +04:00
parent baad76d260
commit 230636b5bc
2 changed files with 2 additions and 2 deletions

View File

@ -748,7 +748,7 @@ public class ItemListInviteRequestItemNode: ListViewItemNode, ItemListItemNode {
}
strongSelf.dismissButton.setTitle(item.presentationData.strings.MemberRequests_Dismiss, with: Font.bold(15.0), with: item.presentationData.theme.list.itemAccentColor, for: .normal)
let addWidth = measureAddLayout.size.width + 10.0
let addWidth = measureAddLayout.size.width + 24.0
let addHeight = strongSelf.addButton.updateLayout(width: addWidth, transition: .immediate)
let addButtonFrame = CGRect(x: leftInset, y: contentSize.height - addHeight - 12.0, width: addWidth, height: addHeight)
strongSelf.addButton.frame = addButtonFrame

View File

@ -663,7 +663,7 @@ public struct PresentationThemeSettings: Codable {
}
var mappedThemePreferredBaseTheme: [Int64: TelegramBaseTheme] = [:]
let themePreferredBaseThemeDict = try container.decode([Int64: Int64].self, forKey: "themePreferredBaseTheme")
let themePreferredBaseThemeDict = try container.decodeIfPresent([Int64: Int64].self, forKey: "themePreferredBaseTheme") ?? [:]
for (key, value) in themePreferredBaseThemeDict {
if let baseTheme = TelegramBaseTheme(rawValue: Int32(clamping: value)) {
mappedThemePreferredBaseTheme[key] = baseTheme