Skip to content

Commit

Permalink
1.9.7 (443)
Browse files Browse the repository at this point in the history
  • Loading branch information
denis15yo committed Feb 13, 2025
1 parent e68a4c7 commit ca9a237
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
"location" : "git@bitbucket.org:mobyrix/nicegram-assistant-ios.git",
"state" : {
"branch" : "develop",
"revision" : "1a97d5e9ca55bc4355d7c61efe1cc84583a50797"
"revision" : "3d75df4c1cb0bea932ad7b3dbdda60950c09a8f3"
}
},
{
Expand Down
33 changes: 33 additions & 0 deletions submodules/TelegramUI/Sources/OpenUrl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1089,6 +1089,9 @@ func openExternalUrlImpl(context: AccountContext, urlContext: OpenURLContext, ur

if let convertedUrl = convertedUrl {
handleInternalUrl(convertedUrl)
} else {
// MARK: Nicegram Deeplink, added 'else' block
showUpdateAppAlert()
}
return
}
Expand Down Expand Up @@ -1213,3 +1216,33 @@ func openExternalUrlImpl(context: AccountContext, urlContext: OpenURLContext, ur
continueHandling()
}
}

// MARK: Nicegram Deeplink
private func showUpdateAppAlert() {
let alert = UIAlertController(
title: "Update the app",
message: "Please update the app to use the newest features!",
preferredStyle: .alert
)

alert.addAction(
UIAlertAction(
title: "Close",
style: .cancel
)
)

alert.addAction(
UIAlertAction(
title: "Update",
style: .default,
handler: { _ in
let urlOpener = CoreContainer.shared.urlOpener()
urlOpener.open(NicegramUrls.appStore)
}
)
)

UIApplication.topViewController?.present(alert, animated: true)
}
//
1 change: 0 additions & 1 deletion submodules/TelegramUI/Sources/TelegramRootController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ public final class TelegramRootController: NavigationController, TelegramRootCon

if #available(iOS 15.0, *) {
Task {
PostTgLoginOnboardingPresenter().presentIfNeeded()
PostLoginOnboardingPresenter().presentIfNeeded()
}
}
Expand Down

0 comments on commit ca9a237

Please sign in to comment.