Skip to content

Commit

Permalink
Read updated profiles from function argument
Browse files Browse the repository at this point in the history
Coming from a "will" publisher, the value in ProfileRepository is
not up-to-date. Use the function argument instead.

Fixes #367
  • Loading branch information
keeshux committed Oct 14, 2023
1 parent cc6c8a9 commit d7f14aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
## 2.2.1 (2023-10-14)

### Fixed

- Persisted profile is overwritten with its former value. [#367](https://github.com/passepartoutvpn/passepartout-apple/issues/367)

## 2.2.0 (2023-10-10)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,7 @@ extension ProfileManager {
currentProfile.value = .placeholder
}

let newProfile = profileRepository.profile(withId: currentProfile.value.id)
if let newProfile = newProfile, newProfile != currentProfile.value {
if let newProfile = newProfiles[currentProfile.value.id], newProfile != currentProfile.value {
pp_log.info("Current profile remotely updated")
currentProfile.value = newProfile
}
Expand Down

0 comments on commit d7f14aa

Please sign in to comment.