Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios

This commit is contained in:
Ilya Laktyushin
2019-09-14 02:05:19 +03:00
67 changed files with 1929 additions and 2156 deletions

View File

@@ -258,12 +258,10 @@ private func leftRevealOptions(strings: PresentationStrings, theme: Presentation
return []
}
var options: [ItemListRevealOption] = []
if !isSavedMessages {
if isUnread {
options.append(ItemListRevealOption(key: RevealOptionKey.toggleMarkedUnread.rawValue, title: strings.DialogList_Read, icon: readIcon, color: theme.list.itemDisclosureActions.inactive.fillColor, textColor: theme.list.itemDisclosureActions.neutral1.foregroundColor))
} else {
options.append(ItemListRevealOption(key: RevealOptionKey.toggleMarkedUnread.rawValue, title: strings.DialogList_Unread, icon: unreadIcon, color: theme.list.itemDisclosureActions.accent.fillColor, textColor: theme.list.itemDisclosureActions.accent.foregroundColor))
}
if isUnread {
options.append(ItemListRevealOption(key: RevealOptionKey.toggleMarkedUnread.rawValue, title: strings.DialogList_Read, icon: readIcon, color: theme.list.itemDisclosureActions.inactive.fillColor, textColor: theme.list.itemDisclosureActions.neutral1.foregroundColor))
} else {
options.append(ItemListRevealOption(key: RevealOptionKey.toggleMarkedUnread.rawValue, title: strings.DialogList_Unread, icon: unreadIcon, color: theme.list.itemDisclosureActions.accent.fillColor, textColor: theme.list.itemDisclosureActions.accent.foregroundColor))
}
if !isEditing {
if isPinned {
@@ -514,7 +512,7 @@ class ChatListItemNode: ItemListRevealOptionsItemNode {
guard let strongSelf = self, let item = strongSelf.item else {
return
}
item.interaction.activateChatPreview(item, strongSelf, gesture)
item.interaction.activateChatPreview(item, strongSelf.contextContainer, gesture)
}
}