From 16cd4b58b4a794450de9fea9af6319471f98eacf Mon Sep 17 00:00:00 2001 From: Denis Shilovich Date: Wed, 4 Dec 2024 07:08:09 +0000 Subject: [PATCH] 1.9.1 (388) --- MODULE.bazel.lock | 8 ++++---- Package.resolved | 8 ++++---- Package.swift | 4 ++-- ng-env.txt | 2 +- .../ChatListUI/Sources/Node/ChatListNode.swift | 4 ++-- submodules/TelegramUI/Sources/AppDelegate.swift | 1 + .../TelegramUI/Sources/ChatHistoryListNode.swift | 6 ++++++ .../Sources/Nicegram/UrlOpenerImpl.swift | 15 +++++++++++++++ 8 files changed, 35 insertions(+), 13 deletions(-) diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index 31159e57c78..b812d3857b6 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -633,8 +633,8 @@ "bzlTransitiveDigest": "8/YWyYftd8THfVoADvrOmQLl45wUGfP2MVjLM5FFn50=", "usagesDigest": "voXBMcSNlo2fnK6JIvInIrncYhBKKG8nBeKvToaUA0Y=", "recordedFileInputs": { - "@@//Package.resolved": "94bf3b85d62a900e06c42285c58a3880c117606257f792e93f9318ff65b76a58", - "@@//Package.swift": "fb3cb1d48066e64f8bf17fe1a49f689b7a6bf4bfc07aa90b9b80a02188501951" + "@@//Package.resolved": "dfe6180a898e1c30eee20d69204a30c0b7eeb67f747cc5652fffe9cccbbe79b3", + "@@//Package.swift": "e40539a065c7d056fc32e7262be36d18862a408341addaabaf262baf981623d5" }, "recordedDirentsInputs": {}, "envVariables": {}, @@ -1119,7 +1119,7 @@ "ruleClassName": "swift_package", "attributes": { "bazel_package_name": "swiftpkg_nicegram_assistant_ios", - "commit": "597a76fda9061acee5562a901ccabef38e37e034", + "commit": "9f62dbae6f8bbd9b663d0b137a3ad802ff19e3e2", "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": "0520ea0bbe945c808fd283d9977d06bd6a5e1ed3", + "commit": "9b54cc30993442deaadd226d638bb8c1787fbf08", "remote": "git@bitbucket.org:mobyrix/nicegram-wallet-ios.git", "version": "", "init_submodules": false, diff --git a/Package.resolved b/Package.resolved index ef1f9588301..c54e04dc32b 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" : "597a76fda9061acee5562a901ccabef38e37e034" + "branch" : "qa/build-388", + "revision" : "9f62dbae6f8bbd9b663d0b137a3ad802ff19e3e2" } }, { @@ -122,8 +122,8 @@ "kind" : "remoteSourceControl", "location" : "git@bitbucket.org:mobyrix/nicegram-wallet-ios.git", "state" : { - "branch" : "develop", - "revision" : "0520ea0bbe945c808fd283d9977d06bd6a5e1ed3" + "branch" : "qa/build-388", + "revision" : "9b54cc30993442deaadd226d638bb8c1787fbf08" } }, { diff --git a/Package.swift b/Package.swift index fbff9b5bdb3..0e2353566e6 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: "qa/build-388"), + .package(url: "git@bitbucket.org:mobyrix/nicegram-wallet-ios.git", branch: "qa/build-388") ] ) diff --git a/ng-env.txt b/ng-env.txt index c23f7a80886..30d74d25844 100644 --- a/ng-env.txt +++ b/ng-env.txt @@ -1 +1 @@ -prod \ No newline at end of file +test \ No newline at end of file diff --git a/submodules/ChatListUI/Sources/Node/ChatListNode.swift b/submodules/ChatListUI/Sources/Node/ChatListNode.swift index d9651f9a6a8..dd6d55501c6 100644 --- a/submodules/ChatListUI/Sources/Node/ChatListNode.swift +++ b/submodules/ChatListUI/Sources/Node/ChatListNode.swift @@ -2381,8 +2381,8 @@ public final class ChatListNode: ListView { // MARK: Nicegram PinnedChats var nicegramItems = nicegramItems - if filter != nil { - nicegramItems = [] + nicegramItems = nicegramItems.filter { item in + filter == nil || item.chat.showInAllFolders } if case .forum(_) = location { nicegramItems = [] diff --git a/submodules/TelegramUI/Sources/AppDelegate.swift b/submodules/TelegramUI/Sources/AppDelegate.swift index 3ac4a3166c4..010621c864c 100644 --- a/submodules/TelegramUI/Sources/AppDelegate.swift +++ b/submodules/TelegramUI/Sources/AppDelegate.swift @@ -444,6 +444,7 @@ private class UserInterfaceStyleObserverWindow: UIWindow { walletData: .init( env: { .init( + appUniversalLinkDomain: NGCore.UrlUtils.ASSOCIATED_DOMAIN, appUrlScheme: buildConfig.appSpecificUrlScheme, enableLogging: ngEnableLogging, keychainGroupIdentifier: NGENV.wallet.keychainGroupIdentifier, diff --git a/submodules/TelegramUI/Sources/ChatHistoryListNode.swift b/submodules/TelegramUI/Sources/ChatHistoryListNode.swift index 4dd50d8b462..0593dbf2d37 100644 --- a/submodules/TelegramUI/Sources/ChatHistoryListNode.swift +++ b/submodules/TelegramUI/Sources/ChatHistoryListNode.swift @@ -1684,6 +1684,12 @@ public final class ChatHistoryListNodeImpl: ListView, ChatHistoryNode, ChatHisto forceRemove: forceRemove ) } + .prepend( + NicegramAdInChat( + ad: nil, + forceRemove: false + ) + ) .toSignal() .skipError() diff --git a/submodules/TelegramUI/Sources/Nicegram/UrlOpenerImpl.swift b/submodules/TelegramUI/Sources/Nicegram/UrlOpenerImpl.swift index 03168fe5980..4d620c3deda 100644 --- a/submodules/TelegramUI/Sources/Nicegram/UrlOpenerImpl.swift +++ b/submodules/TelegramUI/Sources/Nicegram/UrlOpenerImpl.swift @@ -18,6 +18,8 @@ class UrlOpenerImpl { extension UrlOpenerImpl: UrlOpener { func open(_ url: URL) { + let url = prepare(url: url) + let sharedContext = accountContext.sharedContext let navigationController = sharedContext.mainWindow?.viewController as? NavigationController let presentationData = sharedContext.currentPresentationData.with { $0 } @@ -38,3 +40,16 @@ extension UrlOpenerImpl: UrlOpener { ) } } + +private extension UrlOpenerImpl { + func prepare(url: URL) -> URL { + var result = url.absoluteString + + let isSchemeEmpty = url.scheme?.isEmpty ?? true + if isSchemeEmpty { + result = "https://\(result)" + } + + return URL(string: result) ?? url + } +}