mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-09 03:20:48 +00:00
Add NO TAG
This commit is contained in:
parent
fd32830411
commit
c88e69ec29
@ -466,12 +466,16 @@ private enum ChatListFilterPresetEntry: ItemListNodeEntry {
|
||||
var badge: String?
|
||||
var badgeStyle: ItemListSectionHeaderItem.BadgeStyle?
|
||||
var accessoryText: ItemListSectionHeaderAccessoryText?
|
||||
if isPremium, let color {
|
||||
badge = name.uppercased()
|
||||
badgeStyle = ItemListSectionHeaderItem.BadgeStyle(
|
||||
background: color.main.withMultipliedAlpha(0.1),
|
||||
foreground: color.main
|
||||
)
|
||||
if isPremium {
|
||||
if let color {
|
||||
badge = name.uppercased()
|
||||
badgeStyle = ItemListSectionHeaderItem.BadgeStyle(
|
||||
background: color.main.withMultipliedAlpha(0.1),
|
||||
foreground: color.main
|
||||
)
|
||||
} else {
|
||||
accessoryText = ItemListSectionHeaderAccessoryText(value: "NO TAG", color: .generic)
|
||||
}
|
||||
} else if color != nil {
|
||||
accessoryText = ItemListSectionHeaderAccessoryText(value: "PREMIUM EXPIRED", color: .generic)
|
||||
}
|
||||
|
@ -469,10 +469,6 @@ public final class PeerNameColorItemNode: ListViewItemNode, ItemListItemNode {
|
||||
|
||||
var items: [PeerNameColorIconItem] = []
|
||||
var i: Int = 0
|
||||
if item.displayEmptyColor {
|
||||
items.append(PeerNameColorIconItem(index: nil, colors: nil, isDark: item.theme.overallDarkAppearance, selected: item.currentColor == nil, isLocked: item.isLocked, action: action))
|
||||
i += 1
|
||||
}
|
||||
|
||||
for index in displayOrder {
|
||||
let color = PeerNameColor(rawValue: index)
|
||||
@ -489,6 +485,10 @@ public final class PeerNameColorItemNode: ListViewItemNode, ItemListItemNode {
|
||||
items.append(PeerNameColorIconItem(index: color, colors: colors, isDark: item.theme.overallDarkAppearance, selected: color == item.currentColor, isLocked: item.isLocked, action: action))
|
||||
i += 1
|
||||
}
|
||||
if item.displayEmptyColor {
|
||||
items.append(PeerNameColorIconItem(index: nil, colors: nil, isDark: item.theme.overallDarkAppearance, selected: item.currentColor == nil, isLocked: item.isLocked, action: action))
|
||||
i += 1
|
||||
}
|
||||
strongSelf.items = items
|
||||
|
||||
let sideInset: CGFloat = params.leftInset + 10.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user