diff --git a/ios/MullvadVPN/Coordinators/ApplicationCoordinator.swift b/ios/MullvadVPN/Coordinators/ApplicationCoordinator.swift index a58603fb041a..f5fce3f250f1 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.hasSeenLastChanges { routes.append(.changelog) } @@ -995,12 +995,13 @@ extension DeviceState { } fileprivate extension AppPreferencesDataSource { - var isSeenLatestChanges: Bool { - self.lastSeenChangeLogVersion == Bundle.main.shortVersion + var hasSeenLastChanges: Bool { + !ChangeLogInteractor().hasNewChanges || + (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..571eeaf7564b 100644 --- a/ios/MullvadVPN/View controllers/ChangeLog/ChangeLogInteractor.swift +++ b/ios/MullvadVPN/View controllers/ChangeLog/ChangeLogInteractor.swift @@ -12,6 +12,11 @@ import MullvadLogging final class ChangeLogInteractor { private let logger = Logger(label: "ChangeLogInteractor") private var items: [String] = [] + + var hasNewChanges: Bool { + !items.isEmpty + } + var viewModel: ChangeLogViewModel { return ChangeLogViewModel( body: items