From a91ebb988837b87fd82db175eba608fb3a250829 Mon Sep 17 00:00:00 2001 From: Denis Shilovich Date: Wed, 13 Nov 2024 11:08:37 +0000 Subject: [PATCH] 1.8.9 (371) --- MODULE.bazel.lock | 8 ++-- Nicegram/NGData/Sources/NGSettings.swift | 19 -------- .../Sources/NicegramSettingsController.swift | 22 +--------- .../NGUtils/Sources/GrayscaleApplier.swift | 36 --------------- Package.resolved | 8 ++-- Package.swift | 4 +- .../ar.lproj/NiceLocalizable.strings | 3 -- .../de.lproj/NiceLocalizable.strings | 3 -- .../en.lproj/NiceLocalizable.strings | 3 -- .../es.lproj/NiceLocalizable.strings | 3 -- .../fr.lproj/NiceLocalizable.strings | 3 -- .../it.lproj/NiceLocalizable.strings | 3 -- .../ko.lproj/NiceLocalizable.strings | 3 -- .../pl.lproj/NiceLocalizable.strings | 3 -- .../pt.lproj/NiceLocalizable.strings | 3 -- .../ro.lproj/NiceLocalizable.strings | 3 -- .../ru.lproj/NiceLocalizable.strings | 3 -- .../tr.lproj/NiceLocalizable.strings | 3 -- .../uz.lproj/NiceLocalizable.strings | 3 -- .../zh-hans.lproj/NiceLocalizable.strings | 3 -- .../zh-hant.lproj/NiceLocalizable.strings | 3 -- .../Sources/ChatListControllerNode.swift | 18 -------- .../Sources/Node/ChatListItem.swift | 26 ++--------- .../Sources/EmojiStatusComponent.swift | 23 ---------- .../Sources/TextNodeWithEntities.swift | 44 ------------------- .../Sources/ChatControllerNode.swift | 18 -------- .../Wallet/ContactsRetrieverImpl.swift | 3 ++ 27 files changed, 19 insertions(+), 255 deletions(-) delete mode 100644 Nicegram/NGUtils/Sources/GrayscaleApplier.swift diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index 23584b3d52a..54d29e1b182 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -633,8 +633,8 @@ "bzlTransitiveDigest": "8/YWyYftd8THfVoADvrOmQLl45wUGfP2MVjLM5FFn50=", "usagesDigest": "voXBMcSNlo2fnK6JIvInIrncYhBKKG8nBeKvToaUA0Y=", "recordedFileInputs": { - "@@//Package.resolved": "3779e2a661e6b602337cda5a55c25dc6ad25b64c7663df20b465ace0815648c9", - "@@//Package.swift": "06b3269cc384172589fdde95fbbb2df1d1885f83238a187a4084e50d8a1f21c1" + "@@//Package.resolved": "bc2ed3816001707a11f9b115cd17bee392d706c7bc93396b936c128c36b42783", + "@@//Package.swift": "185b5f424db3b08adcaa8b3c4cd1efad446d0aa49b11de9da6b00c0dd0165d32" }, "recordedDirentsInputs": {}, "envVariables": {}, @@ -1119,7 +1119,7 @@ "ruleClassName": "swift_package", "attributes": { "bazel_package_name": "swiftpkg_nicegram_assistant_ios", - "commit": "9c34bfd84fcbb706475ab43eb7149e59aa8653dc", + "commit": "52d1fb8ba76a4d4ddc2a90bbde8c497fe1cf3cac", "remote": "git@bitbucket.org:mobyrix/nicegram-assistant-ios.git", "version": "", "init_submodules": false, @@ -1366,7 +1366,7 @@ "ruleClassName": "swift_package", "attributes": { "bazel_package_name": "swiftpkg_nicegram_wallet_ios", - "commit": "6417219110dae50a9dd129c61795dc469ceb12d0", + "commit": "fbc76a10e90e1e5443e64bbac38bfd9aed12a4ba", "remote": "git@bitbucket.org:mobyrix/nicegram-wallet-ios.git", "version": "", "init_submodules": false, diff --git a/Nicegram/NGData/Sources/NGSettings.swift b/Nicegram/NGData/Sources/NGSettings.swift index caeded46bc6..3850a3fc426 100644 --- a/Nicegram/NGData/Sources/NGSettings.swift +++ b/Nicegram/NGData/Sources/NGSettings.swift @@ -120,25 +120,6 @@ public struct NGSettings { public static var hideBadgeCounters: Bool } -public extension NGSettings { - struct ChatDisplaySettings: Codable { - public var enableGrayscale: Bool = false - } - - @NGStorage(key: "chatDisplaySettings", defaultValue: ChatDisplaySettings()) - static var chatDisplaySettings -} - -public extension NGSettings { - struct ChatListDisplaySettings: Codable { - public var disableAnimations: Bool = false - public var enableGrayscale: Bool = false - } - - @NGStorage(key: "chatListDisplaySettings", defaultValue: ChatListDisplaySettings()) - static var chatListDisplaySettings -} - public struct NGWebSettings { // MARK: Remote Settings @NGStorage(key: "syncPins", defaultValue: false) diff --git a/Nicegram/NGUI/Sources/NicegramSettingsController.swift b/Nicegram/NGUI/Sources/NicegramSettingsController.swift index c6ddcc577f4..568f4fde870 100644 --- a/Nicegram/NGUI/Sources/NicegramSettingsController.swift +++ b/Nicegram/NGUI/Sources/NicegramSettingsController.swift @@ -83,9 +83,6 @@ private enum EasyToggleType { case hideReactions case hideStories case hideBadgeCounters - case enableAnimationsInChatList - case enableGrayscaleInChatList - case enableGrayscaleInChat } @@ -547,12 +544,6 @@ private enum NicegramSettingsControllerEntry: ItemListNodeEntry { } case .hideBadgeCounters: NGSettings.hideBadgeCounters = value - case .enableAnimationsInChatList: - NGSettings.chatListDisplaySettings.disableAnimations = !value - case .enableGrayscaleInChatList: - NGSettings.chatListDisplaySettings.enableGrayscale = value - case .enableGrayscaleInChat: - NGSettings.chatDisplaySettings.enableGrayscale = value } }) case let .unblockHeader(text): @@ -743,19 +734,10 @@ private func nicegramSettingsControllerEntries(presentationData: PresentationDat entries.append(.easyToggle(toggleIndex, .hideStories, l("NicegramSettings.HideStories"), NGSettings.hideStories)) toggleIndex += 1 - + entries.append(.easyToggle(toggleIndex, .hideBadgeCounters, l("NicegramSettings.HideBadgeCounters"), NGSettings.hideBadgeCounters)) toggleIndex += 1 - - entries.append(.easyToggle(toggleIndex, .enableAnimationsInChatList, l("NicegramSettings.EnableAnimationsInChatList"), !NGSettings.chatListDisplaySettings.disableAnimations)) - toggleIndex += 1 - - entries.append(.easyToggle(toggleIndex, .enableGrayscaleInChatList, l("NicegramSettings.EnableGrayscaleInChatList"), NGSettings.chatListDisplaySettings.enableGrayscale)) - toggleIndex += 1 - - entries.append(.easyToggle(toggleIndex, .enableGrayscaleInChat, l("NicegramSettings.EnableGrayscaleInChat"), NGSettings.chatDisplaySettings.enableGrayscale)) - toggleIndex += 1 - + if let sharingSettings { entries.append( .shareBotsData( diff --git a/Nicegram/NGUtils/Sources/GrayscaleApplier.swift b/Nicegram/NGUtils/Sources/GrayscaleApplier.swift deleted file mode 100644 index e6104dae415..00000000000 --- a/Nicegram/NGUtils/Sources/GrayscaleApplier.swift +++ /dev/null @@ -1,36 +0,0 @@ -import UIKit - -public class GrayscaleApplier { - - private var grayscaleLayer: CALayer? - - public init() {} -} - -public extension GrayscaleApplier { - func onLayoutUpdated( - apply: Bool, - frame: CGRect, - superlayer: CALayer? - ) { - if apply { - let grayscaleLayer: CALayer - if let _grayscaleLayer = self.grayscaleLayer { - grayscaleLayer = _grayscaleLayer - } else { - grayscaleLayer = CALayer() - grayscaleLayer.compositingFilter = "colorBlendMode" - grayscaleLayer.backgroundColor = UIColor(red: 0.2, green: 0.2, blue: 0.2, alpha: 1.0).cgColor - - self.grayscaleLayer = grayscaleLayer - - superlayer?.addSublayer(grayscaleLayer) - } - - grayscaleLayer.frame = frame - } else { - self.grayscaleLayer?.removeFromSuperlayer() - self.grayscaleLayer = nil - } - } -} diff --git a/Package.resolved b/Package.resolved index a12409efdf1..6b084f2aaa2 100644 --- a/Package.resolved +++ b/Package.resolved @@ -113,8 +113,8 @@ "kind" : "remoteSourceControl", "location" : "git@bitbucket.org:mobyrix/nicegram-assistant-ios.git", "state" : { - "branch" : "develop", - "revision" : "0f8c6a99b60031394f19946fe6887d4e7a12f3b7" + "branch" : "fix/wallet-bugs", + "revision" : "52d1fb8ba76a4d4ddc2a90bbde8c497fe1cf3cac" } }, { @@ -122,8 +122,8 @@ "kind" : "remoteSourceControl", "location" : "git@bitbucket.org:mobyrix/nicegram-wallet-ios.git", "state" : { - "branch" : "develop", - "revision" : "6417219110dae50a9dd129c61795dc469ceb12d0" + "branch" : "fix/wallet-bugs", + "revision" : "fbc76a10e90e1e5443e64bbac38bfd9aed12a4ba" } }, { diff --git a/Package.swift b/Package.swift index f4b142488dd..b53513bc10f 100644 --- a/Package.swift +++ b/Package.swift @@ -5,7 +5,7 @@ import PackageDescription let package = Package( name: "nicegram-package", dependencies: [ - .package(url: "git@bitbucket.org:mobyrix/nicegram-assistant-ios.git", branch: "develop"), - .package(url: "git@bitbucket.org:mobyrix/nicegram-wallet-ios.git", branch: "develop") + .package(url: "git@bitbucket.org:mobyrix/nicegram-assistant-ios.git", branch: "fix/wallet-bugs"), + .package(url: "git@bitbucket.org:mobyrix/nicegram-wallet-ios.git", branch: "fix/wallet-bugs") ] ) diff --git a/Telegram/Telegram-iOS/ar.lproj/NiceLocalizable.strings b/Telegram/Telegram-iOS/ar.lproj/NiceLocalizable.strings index 69ca64f7d3f..9e91e9ff287 100644 --- a/Telegram/Telegram-iOS/ar.lproj/NiceLocalizable.strings +++ b/Telegram/Telegram-iOS/ar.lproj/NiceLocalizable.strings @@ -162,9 +162,6 @@ "Premium.rememberFolderOnExit" = "تذكر المجلد الحالي عند الخروج"; "NicegramSettings.HideStories" = "إخفاء الستوري"; "NicegramSettings.HideBadgeCounters" = "إخفاء عدادات الشارات"; -"NicegramSettings.EnableAnimationsInChatList" = "الرسوم المتحركة في قائمة الدردشة"; -"NicegramSettings.EnableGrayscaleInChatList" = "الرمادي في قائمة الدردشة"; -"NicegramSettings.EnableGrayscaleInChat" = "الرمادي في الدردشة"; /*Registration Date*/ "NiceFeatures.RegDate.OlderThan" = "أقدم من"; diff --git a/Telegram/Telegram-iOS/de.lproj/NiceLocalizable.strings b/Telegram/Telegram-iOS/de.lproj/NiceLocalizable.strings index 76367931c40..a201ef5b544 100644 --- a/Telegram/Telegram-iOS/de.lproj/NiceLocalizable.strings +++ b/Telegram/Telegram-iOS/de.lproj/NiceLocalizable.strings @@ -161,9 +161,6 @@ "Premium.rememberFolderOnExit" = "Aktuellen Ordner beim Beenden merken"; "NicegramSettings.HideStories" = "Stories verbergen"; "NicegramSettings.HideBadgeCounters" = "Ausblenden der Abzeichenzähler"; -"NicegramSettings.EnableAnimationsInChatList" = "Animationen in der Chatliste"; -"NicegramSettings.EnableGrayscaleInChatList" = "Graustufen in der Chatliste"; -"NicegramSettings.EnableGrayscaleInChat" = "Graustufen im Chat"; /*Registration Date*/ "NiceFeatures.RegDate.OlderThan" = "Älter als"; diff --git a/Telegram/Telegram-iOS/en.lproj/NiceLocalizable.strings b/Telegram/Telegram-iOS/en.lproj/NiceLocalizable.strings index 76ef49b3bc1..67767d7ee4a 100644 --- a/Telegram/Telegram-iOS/en.lproj/NiceLocalizable.strings +++ b/Telegram/Telegram-iOS/en.lproj/NiceLocalizable.strings @@ -161,9 +161,6 @@ "Premium.rememberFolderOnExit" = "Remember current folder on exit"; "NicegramSettings.HideStories" = "Hide Stories"; "NicegramSettings.HideBadgeCounters" = "Hide Badge counters"; -"NicegramSettings.EnableAnimationsInChatList" = "Animations in chat list"; -"NicegramSettings.EnableGrayscaleInChatList" = "Grayscale in chat list"; -"NicegramSettings.EnableGrayscaleInChat" = "Grayscale in chat"; /*Registration Date*/ "NiceFeatures.RegDate.OlderThan" = "Older than"; diff --git a/Telegram/Telegram-iOS/es.lproj/NiceLocalizable.strings b/Telegram/Telegram-iOS/es.lproj/NiceLocalizable.strings index 15e310cf302..84f0257863e 100644 --- a/Telegram/Telegram-iOS/es.lproj/NiceLocalizable.strings +++ b/Telegram/Telegram-iOS/es.lproj/NiceLocalizable.strings @@ -161,9 +161,6 @@ "Premium.rememberFolderOnExit" = "Recordar la carpeta actual a la salida"; "NicegramSettings.HideStories" = "Ocultar Historias"; "NicegramSettings.HideBadgeCounters" = "Ocultar contadores de insignias"; -"NicegramSettings.EnableAnimationsInChatList" = "Animaciones en la lista de chat"; -"NicegramSettings.EnableGrayscaleInChatList" = "Escala de grises en la lista de chat"; -"NicegramSettings.EnableGrayscaleInChat" = "Escala de grises en el chat"; /*Registration Date*/ "NiceFeatures.RegDate.OlderThan" = "Mayor que"; diff --git a/Telegram/Telegram-iOS/fr.lproj/NiceLocalizable.strings b/Telegram/Telegram-iOS/fr.lproj/NiceLocalizable.strings index 5652fb2b8f5..a56a5072f3d 100644 --- a/Telegram/Telegram-iOS/fr.lproj/NiceLocalizable.strings +++ b/Telegram/Telegram-iOS/fr.lproj/NiceLocalizable.strings @@ -161,9 +161,6 @@ "Premium.rememberFolderOnExit" = "Mémoriser le dossier actuel en quittant"; "NicegramSettings.HideStories" = "Cacher les histoires"; "NicegramSettings.HideBadgeCounters" = "Masquer les compteurs de badges"; -"NicegramSettings.EnableAnimationsInChatList" = "Animations dans la liste de chat"; -"NicegramSettings.EnableGrayscaleInChatList" = "Niveaux de gris dans la liste de chat"; -"NicegramSettings.EnableGrayscaleInChat" = "Gris dans le chat"; /*Registration Date*/ "NiceFeatures.RegDate.OlderThan" = "Plus vieux que"; diff --git a/Telegram/Telegram-iOS/it.lproj/NiceLocalizable.strings b/Telegram/Telegram-iOS/it.lproj/NiceLocalizable.strings index 334a5f031c4..f7cec0a1f86 100644 --- a/Telegram/Telegram-iOS/it.lproj/NiceLocalizable.strings +++ b/Telegram/Telegram-iOS/it.lproj/NiceLocalizable.strings @@ -162,9 +162,6 @@ Il browser selezionato deve essere installato."; "Premium.rememberFolderOnExit" = "Ricorda la cartella corrente all'uscita"; "NicegramSettings.HideStories" = "Nascondi Storie"; "NicegramSettings.HideBadgeCounters" = "Nascondi i contatori dei badge"; -"NicegramSettings.EnableAnimationsInChatList" = "Animazioni nella lista chat"; -"NicegramSettings.EnableGrayscaleInChatList" = "Scala di grigi nella lista chat"; -"NicegramSettings.EnableGrayscaleInChat" = "In scala di grigi nella chat"; /*Registration Date*/ "NiceFeatures.RegDate.OlderThan" = "Più vecchio di"; diff --git a/Telegram/Telegram-iOS/ko.lproj/NiceLocalizable.strings b/Telegram/Telegram-iOS/ko.lproj/NiceLocalizable.strings index f1cc4b6d37b..abcbbebac44 100644 --- a/Telegram/Telegram-iOS/ko.lproj/NiceLocalizable.strings +++ b/Telegram/Telegram-iOS/ko.lproj/NiceLocalizable.strings @@ -163,9 +163,6 @@ "Premium.rememberFolderOnExit" = "종료시 현재 폴더 기억하기"; "NicegramSettings.HideStories" = "스토리 숨기기"; "NicegramSettings.HideBadgeCounters" = "뱃지 카운터 숨기기"; -"NicegramSettings.EnableAnimationsInChatList" = "채팅 목록의 애니메이션"; -"NicegramSettings.EnableGrayscaleInChatList" = "채팅 목록의 그레이스케일"; -"NicegramSettings.EnableGrayscaleInChat" = "채팅에서의 그레이스케일"; /*Registration Date*/ "NiceFeatures.RegDate.OlderThan" = "이전의"; diff --git a/Telegram/Telegram-iOS/pl.lproj/NiceLocalizable.strings b/Telegram/Telegram-iOS/pl.lproj/NiceLocalizable.strings index fe213c58878..52566298ee4 100644 --- a/Telegram/Telegram-iOS/pl.lproj/NiceLocalizable.strings +++ b/Telegram/Telegram-iOS/pl.lproj/NiceLocalizable.strings @@ -161,9 +161,6 @@ "Premium.rememberFolderOnExit" = "Zapamiętaj bieżący folder przy wyjściu"; "NicegramSettings.HideStories" = "Ukryj Historie"; "NicegramSettings.HideBadgeCounters" = "Ukryj liczniki odznak"; -"NicegramSettings.EnableAnimationsInChatList" = "Animacje na liście czatów"; -"NicegramSettings.EnableGrayscaleInChatList" = "Skala szarości na liście czatów"; -"NicegramSettings.EnableGrayscaleInChat" = "Skala szarości w czacie"; /*Registration Date*/ "NiceFeatures.RegDate.OlderThan" = "Starsze niż"; diff --git a/Telegram/Telegram-iOS/pt.lproj/NiceLocalizable.strings b/Telegram/Telegram-iOS/pt.lproj/NiceLocalizable.strings index 767cac65d35..b7fefa66dbc 100644 --- a/Telegram/Telegram-iOS/pt.lproj/NiceLocalizable.strings +++ b/Telegram/Telegram-iOS/pt.lproj/NiceLocalizable.strings @@ -161,9 +161,6 @@ "Premium.rememberFolderOnExit" = "Lembrar pasta atual antes de sair"; "NicegramSettings.HideStories" = "Ocultar Stories"; "NicegramSettings.HideBadgeCounters" = "Ocultar contadores de distintivos"; -"NicegramSettings.EnableAnimationsInChatList" = "Animações na lista de chat"; -"NicegramSettings.EnableGrayscaleInChatList" = "Escala de cinza na lista de chat"; -"NicegramSettings.EnableGrayscaleInChat" = "Escala de cinza no chat"; /*Registration Date*/ "NiceFeatures.RegDate.OlderThan" = "Mais antigo que"; diff --git a/Telegram/Telegram-iOS/ro.lproj/NiceLocalizable.strings b/Telegram/Telegram-iOS/ro.lproj/NiceLocalizable.strings index a18d7aa3c17..6bdbc73ad60 100644 --- a/Telegram/Telegram-iOS/ro.lproj/NiceLocalizable.strings +++ b/Telegram/Telegram-iOS/ro.lproj/NiceLocalizable.strings @@ -160,9 +160,6 @@ "Premium.rememberFolderOnExit" = "Ține minte folderul curent la ieșire"; "NicegramSettings.HideStories" = "Ascunde Poveștile"; "NicegramSettings.HideBadgeCounters" = "Ascunde contoarele de insigne"; -"NicegramSettings.EnableAnimationsInChatList" = "Animații în lista de chat"; -"NicegramSettings.EnableGrayscaleInChatList" = "Scala de gri în lista de chat"; -"NicegramSettings.EnableGrayscaleInChat" = "Gri în chat"; /*Registration Date*/ "NiceFeatures.RegDate.OlderThan" = "Mai vechi de"; diff --git a/Telegram/Telegram-iOS/ru.lproj/NiceLocalizable.strings b/Telegram/Telegram-iOS/ru.lproj/NiceLocalizable.strings index db3270f1e13..e47663aabe1 100644 --- a/Telegram/Telegram-iOS/ru.lproj/NiceLocalizable.strings +++ b/Telegram/Telegram-iOS/ru.lproj/NiceLocalizable.strings @@ -161,9 +161,6 @@ "Premium.rememberFolderOnExit" = "Запомнить текущую папку при выходе"; "NicegramSettings.HideStories" = "Скрыть истории"; "NicegramSettings.HideBadgeCounters" = "Скрыть счетчики значков"; -"NicegramSettings.EnableAnimationsInChatList" = "Анимации в списке чата"; -"NicegramSettings.EnableGrayscaleInChatList" = "Оттенки серого в списке чата"; -"NicegramSettings.EnableGrayscaleInChat" = "Оттенки серого в чате"; /*Registration Date*/ "NiceFeatures.RegDate.OlderThan" = "Старше, чем"; diff --git a/Telegram/Telegram-iOS/tr.lproj/NiceLocalizable.strings b/Telegram/Telegram-iOS/tr.lproj/NiceLocalizable.strings index 305fe0cd8a4..f17d26fbea0 100644 --- a/Telegram/Telegram-iOS/tr.lproj/NiceLocalizable.strings +++ b/Telegram/Telegram-iOS/tr.lproj/NiceLocalizable.strings @@ -162,9 +162,6 @@ "Premium.rememberFolderOnExit" = "Çıkışta şu anki klasörü hatırla"; "NicegramSettings.HideStories" = "Hikayeleri Gizle"; "NicegramSettings.HideBadgeCounters" = "Rozet sayacını gizle"; -"NicegramSettings.EnableAnimationsInChatList" = "Sohbet listesinde animasyonlar"; -"NicegramSettings.EnableGrayscaleInChatList" = "Sohbet listesinde gri tonlama"; -"NicegramSettings.EnableGrayscaleInChat" = "Sohbette gri tonlama"; /*Registration Date*/ "NiceFeatures.RegDate.OlderThan" = "Şundan daha eski:"; diff --git a/Telegram/Telegram-iOS/uz.lproj/NiceLocalizable.strings b/Telegram/Telegram-iOS/uz.lproj/NiceLocalizable.strings index c51f757de6a..a8567d818d8 100644 --- a/Telegram/Telegram-iOS/uz.lproj/NiceLocalizable.strings +++ b/Telegram/Telegram-iOS/uz.lproj/NiceLocalizable.strings @@ -160,9 +160,6 @@ "Premium.rememberFolderOnExit" = "dan Kattaroq"; "NicegramSettings.HideStories" = "Hikoyalarni yashirish"; "NicegramSettings.HideBadgeCounters" = "Belgilar sonini yashirish"; -"NicegramSettings.EnableAnimationsInChatList" = "Суҳбат рўйхатидаги анимациялар"; -"NicegramSettings.EnableGrayscaleInChatList" = "Чат рўйхатидаги кулранглар"; -"NicegramSettings.EnableGrayscaleInChat" = "Чатда кулранглар"; /*Registration Date*/ "NiceFeatures.RegDate.OlderThan" = "dan kattaroq"; diff --git a/Telegram/Telegram-iOS/zh-hans.lproj/NiceLocalizable.strings b/Telegram/Telegram-iOS/zh-hans.lproj/NiceLocalizable.strings index 8cc1fc7dc79..889da0e4f1b 100644 --- a/Telegram/Telegram-iOS/zh-hans.lproj/NiceLocalizable.strings +++ b/Telegram/Telegram-iOS/zh-hans.lproj/NiceLocalizable.strings @@ -161,9 +161,6 @@ "Premium.rememberFolderOnExit" = "退出时记住当前分组"; "NicegramSettings.HideStories" = "隐藏故事"; "NicegramSettings.HideBadgeCounters" = "隐藏徽章计数器"; -"NicegramSettings.EnableAnimationsInChatList" = "聊天列表中的动画"; -"NicegramSettings.EnableGrayscaleInChatList" = "聊天列表中的灰度"; -"NicegramSettings.EnableGrayscaleInChat" = "灰度在聊天中"; /*Registration Date*/ "NiceFeatures.RegDate.OlderThan" = "早于"; diff --git a/Telegram/Telegram-iOS/zh-hant.lproj/NiceLocalizable.strings b/Telegram/Telegram-iOS/zh-hant.lproj/NiceLocalizable.strings index b283b4125e5..424f0777020 100644 --- a/Telegram/Telegram-iOS/zh-hant.lproj/NiceLocalizable.strings +++ b/Telegram/Telegram-iOS/zh-hant.lproj/NiceLocalizable.strings @@ -161,9 +161,6 @@ "Premium.rememberFolderOnExit" = "記下應用程式關閉時所在的資料夾"; "NicegramSettings.HideStories" = "隱藏故事"; "NicegramSettings.HideBadgeCounters" = "隱藏徽章計數器"; -"NicegramSettings.EnableAnimationsInChatList" = "聊天列表中的動畫"; -"NicegramSettings.EnableGrayscaleInChatList" = "聊天列表中的灰階"; -"NicegramSettings.EnableGrayscaleInChat" = "灰階在聊天中"; /*Registration Date*/ "NiceFeatures.RegDate.OlderThan" = "早於"; diff --git a/submodules/ChatListUI/Sources/ChatListControllerNode.swift b/submodules/ChatListUI/Sources/ChatListControllerNode.swift index b49bba9cd64..790b0aa7b4c 100644 --- a/submodules/ChatListUI/Sources/ChatListControllerNode.swift +++ b/submodules/ChatListUI/Sources/ChatListControllerNode.swift @@ -1,9 +1,6 @@ // MARK: Nicegram HideStories import NGData // -// MARK: Nicegram ColorAlign -import NGUtils -// import Foundation import UIKit import AsyncDisplayKit @@ -1059,10 +1056,6 @@ final class ChatListControllerNode: ASDisplayNode, ASGestureRecognizerDelegate { } } - // MARK: Nicegram ColorAlign - private let grayscaleApplier = GrayscaleApplier() - // - private(set) var inlineStackContainerTransitionFraction: CGFloat = 0.0 private(set) var inlineStackContainerNode: ChatListContainerNode? private var inlineContentPanRecognizer: InteractiveTransitionGestureRecognizer? @@ -1665,17 +1658,6 @@ final class ChatListControllerNode: ASDisplayNode, ASGestureRecognizerDelegate { navigationBarComponentView.deferScrollApplication = false navigationBarComponentView.applyCurrentScroll(transition: ComponentTransition(transition)) } - - // MARK: Nicegram ColorAlign - self.grayscaleApplier.onLayoutUpdated( - apply: NGSettings.chatListDisplaySettings.enableGrayscale, - frame: CGRect( - origin: .zero, - size: layout.size - ), - superlayer: self.layer - ) - // } func activateSearch(placeholderNode: SearchBarPlaceholderNode, displaySearchFilters: Bool, hasDownloads: Bool, initialFilter: ChatListSearchFilter, navigationController: NavigationController?) -> (ASDisplayNode, (Bool) -> Void)? { diff --git a/submodules/ChatListUI/Sources/Node/ChatListItem.swift b/submodules/ChatListUI/Sources/Node/ChatListItem.swift index 6454a4f41c7..18c38d5c7b4 100644 --- a/submodules/ChatListUI/Sources/Node/ChatListItem.swift +++ b/submodules/ChatListUI/Sources/Node/ChatListItem.swift @@ -1020,8 +1020,7 @@ public class ChatListItemNode: ItemListRevealOptionsItemNode { content: titleTopicIconContent, isVisibleForAnimations: (currentNode?.visibilityStatus ?? false) && context.sharedContext.energyUsageSettings.loopEmoji, action: nil - // MARK: Nicegram ColorAlign, added .applyingChatListDisplaySettings() - ).applyingChatListDisplaySettings() + ) let targetNode = currentNode ?? TopicItemNode(topicTitleNode: topicTitleNode, titleTopicIconView: titleTopicIconView, titleTopicIconComponent: titleTopicIconComponent) @@ -1975,10 +1974,6 @@ public class ChatListItemNode: ItemListRevealOptionsItemNode { } func asyncLayout() -> (_ item: ChatListItem, _ params: ListViewItemLayoutParams, _ first: Bool, _ last: Bool, _ firstWithHeader: Bool, _ nextIsPinned: Bool) -> (ListViewItemNodeLayout, (Bool, Bool) -> Void) { - // MARK: Nicegram ColorAlign - self.textNode.disableAnimations = NGSettings.chatListDisplaySettings.disableAnimations - // - let dateLayout = TextNode.asyncLayout(self.dateNode) let textLayout = TextNodeWithEntities.asyncLayout(self.textNode) let makeTrailingTextBadgeLayout = TextNode.asyncLayout(self.trailingTextBadgeNode) @@ -3754,8 +3749,7 @@ public class ChatListItemNode: ItemListRevealOptionsItemNode { content: avatarIconContent, isVisibleForAnimations: strongSelf.visibilityStatus && item.context.sharedContext.energyUsageSettings.loopEmoji, action: nil - // MARK: Nicegram ColorAlign, added .applyingChatListDisplaySettings() - ).applyingChatListDisplaySettings() + ) strongSelf.avatarIconComponent = avatarIconComponent let iconSize = avatarIconView.update( @@ -4472,8 +4466,7 @@ public class ChatListItemNode: ItemListRevealOptionsItemNode { content: currentCredibilityIconContent, isVisibleForAnimations: strongSelf.visibilityStatus && item.context.sharedContext.energyUsageSettings.loopEmoji, action: nil - // MARK: Nicegram ColorAlign, added .applyingChatListDisplaySettings() - ).applyingChatListDisplaySettings() + ) strongSelf.credibilityIconComponent = credibilityIconComponent let iconSize = credibilityIconView.update( @@ -4506,8 +4499,7 @@ public class ChatListItemNode: ItemListRevealOptionsItemNode { content: currentVerifiedIconContent, isVisibleForAnimations: strongSelf.visibilityStatus && item.context.sharedContext.energyUsageSettings.loopEmoji, action: nil - // MARK: Nicegram ColorAlign, added .applyingChatListDisplaySettings() - ).applyingChatListDisplaySettings() + ) strongSelf.verifiedIconComponent = verifiedIconComponent let iconSize = verifiedIconView.update( @@ -4976,16 +4968,6 @@ public class ChatListItemNode: ItemListRevealOptionsItemNode { } } -// MARK: Nicegram ColorAlign -private extension EmojiStatusComponent { - func applyingChatListDisplaySettings() -> EmojiStatusComponent { - var result = self - result.ngDisableAnimations = NGSettings.chatListDisplaySettings.disableAnimations - return result - } -} -// - // MARK: Nicegram PinnedChats private extension ChatListItem { var isNicegramItem: Bool { diff --git a/submodules/TelegramUI/Components/EmojiStatusComponent/Sources/EmojiStatusComponent.swift b/submodules/TelegramUI/Components/EmojiStatusComponent/Sources/EmojiStatusComponent.swift index 43b5945f202..b8a29122892 100644 --- a/submodules/TelegramUI/Components/EmojiStatusComponent/Sources/EmojiStatusComponent.swift +++ b/submodules/TelegramUI/Components/EmojiStatusComponent/Sources/EmojiStatusComponent.swift @@ -62,9 +62,6 @@ public final class EmojiStatusComponent: Component { public let size: CGSize? public let isVisibleForAnimations: Bool public let useSharedAnimation: Bool - // MARK: Nicegram ColorAlign - public var ngDisableAnimations: Bool - // public let action: (() -> Void)? public let emojiFileUpdated: ((TelegramMediaFile?) -> Void)? @@ -76,9 +73,6 @@ public final class EmojiStatusComponent: Component { size: CGSize? = nil, isVisibleForAnimations: Bool, useSharedAnimation: Bool = false, - // MARK: Nicegram ColorAlign - ngDisableAnimations: Bool = false, - // action: (() -> Void)?, emojiFileUpdated: ((TelegramMediaFile?) -> Void)? = nil ) { @@ -94,9 +88,6 @@ public final class EmojiStatusComponent: Component { size: size, isVisibleForAnimations: isVisibleForAnimations, useSharedAnimation: useSharedAnimation, - // MARK: Nicegram ColorAlign - ngDisableAnimations: ngDisableAnimations, - // action: action, emojiFileUpdated: emojiFileUpdated ) @@ -112,9 +103,6 @@ public final class EmojiStatusComponent: Component { size: CGSize? = nil, isVisibleForAnimations: Bool, useSharedAnimation: Bool = false, - // MARK: Nicegram ColorAlign - ngDisableAnimations: Bool = false, - // action: (() -> Void)?, emojiFileUpdated: ((TelegramMediaFile?) -> Void)? = nil ) { @@ -127,9 +115,6 @@ public final class EmojiStatusComponent: Component { self.size = size self.isVisibleForAnimations = isVisibleForAnimations self.useSharedAnimation = useSharedAnimation - // MARK: Nicegram ColorAlign - self.ngDisableAnimations = ngDisableAnimations - // self.action = action self.emojiFileUpdated = emojiFileUpdated } @@ -145,9 +130,6 @@ public final class EmojiStatusComponent: Component { size: self.size, isVisibleForAnimations: isVisibleForAnimations, useSharedAnimation: self.useSharedAnimation, - // MARK: Nicegram ColorAlign - ngDisableAnimations: self.ngDisableAnimations, - // action: self.action, emojiFileUpdated: self.emojiFileUpdated ) @@ -564,11 +546,6 @@ public final class EmojiStatusComponent: Component { animationLayer.frame = CGRect(origin: CGPoint(), size: size) animationLayer.isVisibleForAnimations = component.isVisibleForAnimations - // MARK: Nicegram ColorAlign - if component.ngDisableAnimations { - animationLayer.isVisibleForAnimations = false - } - // /*} else { if self.emojiFileDataPathDisposable == nil { let account = component.context.account diff --git a/submodules/TelegramUI/Components/TextNodeWithEntities/Sources/TextNodeWithEntities.swift b/submodules/TelegramUI/Components/TextNodeWithEntities/Sources/TextNodeWithEntities.swift index 0a2823a9145..dc3db471197 100644 --- a/submodules/TelegramUI/Components/TextNodeWithEntities/Sources/TextNodeWithEntities.swift +++ b/submodules/TelegramUI/Components/TextNodeWithEntities/Sources/TextNodeWithEntities.swift @@ -96,10 +96,6 @@ public final class TextNodeWithEntities { private var enableLooping: Bool = true - // MARK: Nicegram ColorAlign - public var disableAnimations: Bool = false - // - public var visibilityRect: CGRect? { didSet { if !self.inlineStickerItemLayers.isEmpty && oldValue != self.visibilityRect { @@ -131,10 +127,6 @@ public final class TextNodeWithEntities { public static func asyncLayout(_ maybeNode: TextNodeWithEntities?) -> (TextNodeLayoutArguments) -> (TextNodeLayout, (TextNodeWithEntities.Arguments?) -> TextNodeWithEntities) { let makeLayout = TextNode.asyncLayout(maybeNode?.textNode) return { [weak maybeNode] arguments in - // MARK: Nicegram ColorAlign - let arguments = maybeNode?.nicegramAdjust(textNodeLayoutArguments: arguments) ?? arguments - // - var updatedString: NSAttributedString? if let sourceString = arguments.attributedString { let string = NSMutableAttributedString(attributedString: sourceString) @@ -222,42 +214,6 @@ public final class TextNodeWithEntities { } } - // MARK: Nicegram ColorAlign - func nicegramAdjust(textNodeLayoutArguments arguments: TextNodeLayoutArguments) -> TextNodeLayoutArguments { - guard self.disableAnimations else { - return arguments - } - - let attributedString: NSAttributedString? - if let originalAttributedString = arguments.attributedString { - let mutableString = NSMutableAttributedString(attributedString: originalAttributedString) - - var attributesToRemove = [ - ChatTextInputAttributes.customEmoji, - ChatTextInputAttributes.spoiler - ] - attributesToRemove.append( - contentsOf: [TelegramTextAttributes.Spoiler].compactMap { - NSAttributedString.Key($0) - } - ) - attributesToRemove.forEach { - mutableString.removeAttribute( - $0, - range: NSRange(location: 0, length: mutableString.length) - ) - } - - attributedString = mutableString - } else { - attributedString = nil - } - - return arguments - .withAttributedString(attributedString) - } - // - private func isItemVisible(itemRect: CGRect) -> Bool { if let visibilityRect = self.visibilityRect { return itemRect.intersects(visibilityRect) diff --git a/submodules/TelegramUI/Sources/ChatControllerNode.swift b/submodules/TelegramUI/Sources/ChatControllerNode.swift index 6d8479ee472..2f5f7e987f2 100644 --- a/submodules/TelegramUI/Sources/ChatControllerNode.swift +++ b/submodules/TelegramUI/Sources/ChatControllerNode.swift @@ -14,9 +14,6 @@ import FeatTgChatButton import NGUtils import NicegramWallet // -// MARK: Nicegram ColorAlign -import NGData -// import Foundation import UIKit import AsyncDisplayKit @@ -178,10 +175,6 @@ class ChatControllerNode: ASDisplayNode, ASScrollViewDelegate { let loadingNode: ChatLoadingNode private(set) var loadingPlaceholderNode: ChatLoadingPlaceholderNode? - // MARK: Nicegram ColorAlign - private var grayscaleApplier = GrayscaleApplier() - // - var alwaysShowSearchResultsAsList: Bool = false var includeSavedPeersInSearchResults: Bool = false var showListEmptyResults: Bool = false @@ -3236,17 +3229,6 @@ class ChatControllerNode: ASDisplayNode, ASScrollViewDelegate { self.derivedLayoutState = ChatControllerNodeDerivedLayoutState(inputContextPanelsFrame: inputContextPanelsFrame, inputContextPanelsOverMainPanelFrame: inputContextPanelsOverMainPanelFrame, inputNodeHeight: inputNodeHeightAndOverflow?.0, inputNodeAdditionalHeight: inputNodeHeightAndOverflow?.1, upperInputPositionBound: inputNodeHeightAndOverflow?.0 != nil ? self.upperInputPositionBound : nil) - // MARK: Nicegram ColorAlign - self.grayscaleApplier.onLayoutUpdated( - apply: NGSettings.chatDisplaySettings.enableGrayscale, - frame: CGRect( - origin: .zero, - size: layout.size - ), - superlayer: self.layer - ) - // - //self.notifyTransitionCompletionListeners(transition: transition) } diff --git a/submodules/TelegramUI/Sources/Nicegram/Wallet/ContactsRetrieverImpl.swift b/submodules/TelegramUI/Sources/Nicegram/Wallet/ContactsRetrieverImpl.swift index 7aca581eda6..6d6db4408aa 100644 --- a/submodules/TelegramUI/Sources/Nicegram/Wallet/ContactsRetrieverImpl.swift +++ b/submodules/TelegramUI/Sources/Nicegram/Wallet/ContactsRetrieverImpl.swift @@ -14,6 +14,9 @@ struct ContactsRetrieverImpl { ) .awaitForFirstValue() .peers + .filter { + $0.id != context.account.peerId + } .map { peer in WalletTgUtils.peerToWalletContact( peer: peer