Skip to content

Commit

Permalink
Merge pull request #83 from AppSci/release/1.0.15
Browse files Browse the repository at this point in the history
[WBIOS-3030] Bugfix: Enable to use dismiss on old panda screens
  • Loading branch information
yehorkyrylov authored May 25, 2023
2 parents f80256a + bbcd842 commit 76ab8bb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Sources/PandaSDK/Views/WebViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,12 @@ final class WebViewController: UIViewController, WKScriptMessageHandler {
wv.alpha = 0

if let html = html {
load(html: html, baseURL: URL(fileURLWithPath: Bundle.main.bundlePath))
load(
html: html,
baseURL: html.contains(Constants.oldDismiss) // We are still using old panda screens that do not yet use JS dismiss functions, so we need to check whether it is the old screen or the new
? nil
: URL(fileURLWithPath: Bundle.main.bundlePath)
)
}
}

Expand Down Expand Up @@ -829,5 +834,6 @@ extension WebViewController {

private enum Constants {
static let hideTrialJSFunctionName = "removeTrialUi()"
static let oldDismiss = "dismiss?type=dismiss"
}
}

0 comments on commit 76ab8bb

Please sign in to comment.