Skip to content

Commit

Permalink
Remove restoration identifier when reloading
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernando Olivares committed Jul 4, 2024
1 parent 23d5ca9 commit 014e4f6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Source/Session/Session.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public class Session: NSObject {

if reload {
initialized = false
removeRestorationIdentifier(for: visitable)
}

let visit = makeVisit(for: visitable, options: options ?? VisitOptions())
Expand Down Expand Up @@ -150,6 +151,10 @@ public class Session: NSObject {
visitableRestorationIdentifiers.setObject(restorationIdentifier as NSString, forKey: visitable.visitableViewController)
}

private func removeRestorationIdentifier(for visitable: Visitable) {
visitableRestorationIdentifiers.removeObject(forKey: visitable.visitableViewController)
}

// MARK: - Navigation

private func completeNavigationForCurrentVisit() {
Expand Down

0 comments on commit 014e4f6

Please sign in to comment.