diff --git a/ios/MullvadVPN/Coordinators/ApplicationCoordinator.swift b/ios/MullvadVPN/Coordinators/ApplicationCoordinator.swift index 3de34f1515a2..77b76657111d 100644 --- a/ios/MullvadVPN/Coordinators/ApplicationCoordinator.swift +++ b/ios/MullvadVPN/Coordinators/ApplicationCoordinator.swift @@ -326,7 +326,7 @@ final class ApplicationCoordinator: Coordinator, Presenting, RootContainerViewCo } // Change log can be presented simultaneously with other routes. - if !appPreferences.isSeenLatestChanges { + if !appPreferences.hasSeenLastChangelog { routes.append(.changelog) } @@ -995,12 +995,16 @@ extension DeviceState { } fileprivate extension AppPreferencesDataSource { - var isSeenLatestChanges: Bool { - self.lastSeenChangeLogVersion == Bundle.main.shortVersion + var hasSeenLastChangelog: Bool { + guard !ChangeLogInteractor().items.isEmpty else { + return true + } + + return lastSeenChangeLogVersion == Bundle.main.shortVersion } mutating func markChangeLogSeen() { - self.lastSeenChangeLogVersion = Bundle.main.shortVersion + lastSeenChangeLogVersion = Bundle.main.shortVersion } // swiftlint:disable:next file_length diff --git a/ios/MullvadVPN/View controllers/ChangeLog/ChangeLogInteractor.swift b/ios/MullvadVPN/View controllers/ChangeLog/ChangeLogInteractor.swift index 3e5a85007fbf..e44c15bf2551 100644 --- a/ios/MullvadVPN/View controllers/ChangeLog/ChangeLogInteractor.swift +++ b/ios/MullvadVPN/View controllers/ChangeLog/ChangeLogInteractor.swift @@ -11,7 +11,7 @@ import MullvadLogging final class ChangeLogInteractor { private let logger = Logger(label: "ChangeLogInteractor") - private var items: [String] = [] + private(set) var items: [String] = [] var viewModel: ChangeLogViewModel { return ChangeLogViewModel( body: items