From b77185fcb8a15892f4af5861fa5d2fb198152964 Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Thu, 21 Mar 2024 17:38:06 +0400 Subject: [PATCH] Various fixes --- Telegram/Telegram-iOS/en.lproj/Localizable.strings | 2 +- submodules/ContactListUI/Sources/ContactListNode.swift | 9 +++++++++ .../Sources/TelegramEngine/Peers/Birthdays.swift | 3 +++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Telegram/Telegram-iOS/en.lproj/Localizable.strings b/Telegram/Telegram-iOS/en.lproj/Localizable.strings index aba0d3b32f..e01ad11179 100644 --- a/Telegram/Telegram-iOS/en.lproj/Localizable.strings +++ b/Telegram/Telegram-iOS/en.lproj/Localizable.strings @@ -11649,7 +11649,7 @@ Sorry for the inconvenience."; "ChatList.AddBirthdayTitle" = "Add your birthday! 🎂"; "ChatList.AddBirthdayText" = "Let your contacts know when you're celebrating."; -"ChatList.BirthdaySingleTitle" = "It's %@ **birthday** today! 🎂"; +"ChatList.BirthdaySingleTitle" = "It's %@'s **birthday** today! 🎂"; "ChatList.BirthdaySingleText" = "Gift them Telegram Premium."; "ChatList.BirthdayMultipleTitle_1" = "%@ contact have **birthday** today! 🎂"; diff --git a/submodules/ContactListUI/Sources/ContactListNode.swift b/submodules/ContactListUI/Sources/ContactListNode.swift index aec9482aca..65de77ab72 100644 --- a/submodules/ContactListUI/Sources/ContactListNode.swift +++ b/submodules/ContactListUI/Sources/ContactListNode.swift @@ -538,6 +538,9 @@ private func contactListNodeEntries(accountPeer: EnginePeer?, peers: [ContactLis var index: Int = 0 for peer in topPeers.prefix(15) { + if peer.isDeleted { + continue + } existingPeerIds.insert(.peer(peer.id)) let selection: ContactsPeerItemSelection @@ -579,6 +582,9 @@ private func contactListNodeEntries(accountPeer: EnginePeer?, peers: [ContactLis for peerId in peerIds { if let peer = topPeers.first(where: { $0.id == peerId }) { + if peer.isDeleted { + continue + } if existingPeerIds.contains(.peer(peer.id)) { continue } @@ -625,6 +631,9 @@ private func contactListNodeEntries(accountPeer: EnginePeer?, peers: [ContactLis }) for peer in topPeers.prefix(15) { + if peer.isDeleted { + continue + } if existingPeerIds.contains(.peer(peer.id)) { continue } diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Peers/Birthdays.swift b/submodules/TelegramCore/Sources/TelegramEngine/Peers/Birthdays.swift index 2c57cef167..556bc5bb77 100644 --- a/submodules/TelegramCore/Sources/TelegramEngine/Peers/Birthdays.swift +++ b/submodules/TelegramCore/Sources/TelegramEngine/Peers/Birthdays.swift @@ -119,6 +119,9 @@ func managedContactBirthdays(stateManager: AccountStateManager) -> Signal