Skip to content

Commit

Permalink
Rename property
Browse files Browse the repository at this point in the history
  • Loading branch information
joemasilotti committed Feb 26, 2024
1 parent 0dbf9d9 commit 9581c69
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Source/Session/Session.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion Source/Turbo Navigator/TurboNavigator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9581c69

Please sign in to comment.