mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-01-01 10:50:51 +00:00
FIx Apple folders size
This commit is contained in:
@@ -234,8 +234,8 @@ private final class ItemNode: ASDisplayNode {
|
||||
self.shortTitleNode.visibility = title.enableAnimations
|
||||
|
||||
if themeUpdated || titleUpdated {
|
||||
self.titleNode.attributedText = title.attributedString(font: Font.bold(17.0), textColor: isSelected ? presentationData.theme.contextMenu.badgeForegroundColor : presentationData.theme.list.itemSecondaryTextColor)
|
||||
self.shortTitleNode.attributedText = shortTitle.attributedString(font: Font.bold(17.0), textColor: isSelected ? presentationData.theme.contextMenu.badgeForegroundColor : presentationData.theme.list.itemSecondaryTextColor)
|
||||
self.titleNode.attributedText = title.attributedString(font: Font.medium(14.0), textColor: isSelected ? presentationData.theme.contextMenu.badgeForegroundColor : presentationData.theme.list.itemSecondaryTextColor)
|
||||
self.shortTitleNode.attributedText = shortTitle.attributedString(font: Font.medium(14.0), textColor: isSelected ? presentationData.theme.contextMenu.badgeForegroundColor : presentationData.theme.list.itemSecondaryTextColor)
|
||||
|
||||
}
|
||||
//
|
||||
|
||||
@@ -157,12 +157,19 @@ private func SGControllerEntries(presentationData: PresentationData, callListSet
|
||||
|
||||
entries.append(.header(id: id.count, section: .folders, text: strings.Settings_ChatFolders.uppercased(), badge: nil))
|
||||
entries.append(.toggle(id: id.count, section: .folders, settingName: .foldersAtBottom, value: experimentalUISettings.foldersTabAtBottom, text: i18n("Settings.Folders.BottomTab", lang), enabled: true))
|
||||
entries.append(.oneFromManySelector(id: id.count, section: .folders, settingName: .bottomTabStyle, text: i18n("Settings.Folders.BottomTabStyle", lang), value: i18n("Settings.Folders.BottomTabStyle.\(SGSimpleSettings.shared.bottomTabStyle)", lang), enabled: experimentalUISettings.foldersTabAtBottom))
|
||||
// Disabled while Telegram is migrating to Glass
|
||||
// entries.append(.oneFromManySelector(id: id.count, section: .folders, settingName: .bottomTabStyle, text: i18n("Settings.Folders.BottomTabStyle", lang), value: i18n("Settings.Folders.BottomTabStyle.\(SGSimpleSettings.shared.bottomTabStyle)", lang), enabled: experimentalUISettings.foldersTabAtBottom))
|
||||
entries.append(.toggle(id: id.count, section: .folders, settingName: .allChatsHidden, value: SGSimpleSettings.shared.allChatsHidden, text: i18n("Settings.Folders.AllChatsHidden", lang, strings.ChatList_Tabs_AllChats), enabled: true))
|
||||
#if DEBUG
|
||||
// entries.append(.oneFromManySelector(id: id.count, section: .folders, settingName: .allChatsFolderPositionOverride, text: i18n("Settings.Folders.AllChatsPlacement", lang), value: i18n("Settings.Folders.AllChatsPlacement.\(SGSimpleSettings.shared.allChatsFolderPositionOverride)", lang), enabled: true))
|
||||
#endif
|
||||
entries.append(.toggle(id: id.count, section: .folders, settingName: .compactFolderNames, value: SGSimpleSettings.shared.compactFolderNames, text: i18n("Settings.Folders.CompactNames", lang), enabled: SGSimpleSettings.shared.bottomTabStyle != SGSimpleSettings.BottomTabStyleValues.ios.rawValue))
|
||||
let compactFolderNamesEditable: Bool
|
||||
if experimentalUISettings.foldersTabAtBottom {
|
||||
compactFolderNamesEditable = SGSimpleSettings.shared.bottomTabStyle != SGSimpleSettings.BottomTabStyleValues.ios.rawValue
|
||||
} else {
|
||||
compactFolderNamesEditable = true
|
||||
}
|
||||
entries.append(.toggle(id: id.count, section: .folders, settingName: .compactFolderNames, value: SGSimpleSettings.shared.compactFolderNames, text: i18n("Settings.Folders.CompactNames", lang), enabled: compactFolderNamesEditable))
|
||||
entries.append(.oneFromManySelector(id: id.count, section: .folders, settingName: .allChatsTitleLengthOverride, text: i18n("Settings.Folders.AllChatsTitle", lang), value: i18n("Settings.Folders.AllChatsTitle.\(SGSimpleSettings.shared.allChatsTitleLengthOverride)", lang), enabled: true))
|
||||
entries.append(.toggle(id: id.count, section: .folders, settingName: .rememberLastFolder, value: SGSimpleSettings.shared.rememberLastFolder, text: i18n("Settings.Folders.RememberLast", lang), enabled: true))
|
||||
entries.append(.notice(id: id.count, section: .folders, text: i18n("Settings.Folders.RememberLast.Notice", lang)))
|
||||
|
||||
@@ -313,8 +313,14 @@ public class SGSimpleSettings {
|
||||
@UserDefault(key: Keys.rememberLastFolder.rawValue)
|
||||
public var rememberLastFolder: Bool
|
||||
|
||||
@UserDefault(key: Keys.bottomTabStyle.rawValue)
|
||||
public var bottomTabStyle: String
|
||||
// Disabled while Telegram is migrating to Glass
|
||||
// @UserDefault(key: Keys.bottomTabStyle.rawValue)
|
||||
public var bottomTabStyle: String {
|
||||
set {}
|
||||
get {
|
||||
return BottomTabStyleValues.ios.rawValue
|
||||
}
|
||||
}
|
||||
|
||||
public var lastAccountFolders = UserDefaultsBackedDictionary<String, Int32>(userDefaultsKey: Keys.lastAccountFolders.rawValue, threadSafe: false)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user