From 9581c6908f43e0ba3aa304b482fe91e1f1f5d956 Mon Sep 17 00:00:00 2001 From: Joe Masilotti Date: Mon, 26 Feb 2024 14:20:23 -0800 Subject: [PATCH] Rename property --- Source/Session/Session.swift | 6 +++--- Source/Turbo Navigator/TurboNavigator.swift | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Session/Session.swift b/Source/Session/Session.swift index 98fc287..54a6e8a 100644 --- a/Source/Session/Session.swift +++ b/Source/Session/Session.swift @@ -11,7 +11,7 @@ public class Session: NSObject { public let webView: WKWebView public var pathConfiguration: PathConfiguration? - var needsCacheClearing = false + var isSnapshotCacheStale = false private lazy var bridge = WebViewBridge(webView: webView) private var initialized = false @@ -217,9 +217,9 @@ extension Session: VisitableDelegate { public func visitableViewWillAppear(_ visitable: Visitable) { guard let topmostVisit = self.topmostVisit, let currentVisit = self.currentVisit else { return } - if needsCacheClearing { + if isSnapshotCacheStale { clearSnapshotCache() - needsCacheClearing = false + isSnapshotCacheStale = false } if visitable === topmostVisit.visitable && visitable.visitableViewController.isMovingToParent { diff --git a/Source/Turbo Navigator/TurboNavigator.swift b/Source/Turbo Navigator/TurboNavigator.swift index 950b80d..499ee5c 100644 --- a/Source/Turbo Navigator/TurboNavigator.swift +++ b/Source/Turbo Navigator/TurboNavigator.swift @@ -143,7 +143,7 @@ extension TurboNavigator: SessionDelegate { public func sessionDidFinishFormSubmission(_ session: Session) { if session == modalSession { - self.session.needsCacheClearing = true + self.session.isSnapshotCacheStale = true } if let url = session.topmostVisitable?.visitableURL { delegate.formSubmissionDidFinish(at: url)