Skip to content

Commit

Permalink
Merge tag 'Ent_TestFlight_8.8.2203'
Browse files Browse the repository at this point in the history
  • Loading branch information
FrPellissier committed Oct 4, 2023
2 parents dc809fe + 95d7012 commit d88d170
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
3 changes: 1 addition & 2 deletions entourage/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
Logger.print("***** Instance : \(instance) - id : \(instanceId)")
let postId = extras["post_id"] as? Int
Logger.print("***** post id : \(postId) ")
let stage = extras["stage"]
let notifData = NotificationPushData(instanceName: instance, instanceId: instanceId, postId: postId, stage: stage as! String)
let notifData = NotificationPushData(instanceName: instance, instanceId: instanceId, postId: postId)

if isFromBackground {
DeepLinkManager.presentAction(notification: notifData)
Expand Down
6 changes: 4 additions & 2 deletions entourage/Managers/WebLinkManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ struct WebLinkManager {

static func openUrl(url:URL?, openInApp:Bool, presenterViewController:UIViewController?, safariDelegate:SFSafariViewControllerDelegate? = nil) {
if let _url = url {
let isOurPattern = _url.absoluteString.contains(prodURL) || _url.absoluteString.contains(prodURL2) || _url.absoluteString.contains(stagingURL) || _url.absoluteString.contains(stagingURL2)
var isOurPattern = _url.absoluteString.contains(prodURL) || _url.absoluteString.contains(prodURL2) || _url.absoluteString.contains(stagingURL) || _url.absoluteString.contains(stagingURL2)
if _url.absoluteString.contains("action"){
isOurPattern = false
}
if isOurPattern {
let components = URLComponents(url: _url, resolvingAgainstBaseURL: false)!
UniversalLinkManager.handleUniversalLink(components:components)
return
}
}

if openInApp {
openUrlInApp(url: url?.checkAndAddScheme, presenterViewController: presenterViewController,safariDelegate: safariDelegate)
return
Expand Down
2 changes: 1 addition & 1 deletion entourage/Models/NotifInApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct NotifInApp:Codable {


func getNotificationPushData() -> NotificationPushData {
return NotificationPushData(instanceName: instanceString, instanceId: instanceId ?? 0, postId:postId, stage: "")
return NotificationPushData(instanceName: instanceString, instanceId: instanceId ?? 0, postId:postId)
}


Expand Down
6 changes: 2 additions & 4 deletions entourage/Models/NotificationPushData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@ struct NotificationPushData {
var postId:Int? = nil
var welcome: Bool? = false
//value = h1, j2, j8, j11
var stage: String? = nil
var url: String? = nil
var stage:String? = nil


init(instanceName:String, instanceId:Int, postId:Int?, stage:String?) {
init(instanceName:String, instanceId:Int, postId:Int?) {
self.instanceType = InstanceType.getFromString(key: instanceName)
self.instanceId = instanceId
self.postId = postId
self.stage = stage
}
}

Expand Down

0 comments on commit d88d170

Please sign in to comment.