Make function to increase profile revision counter internal

This commit is contained in:
Daniel 2021-12-16 13:42:17 +01:00
parent 6a430d1d7c
commit 3e17bc8ec2
2 changed files with 5 additions and 4 deletions

View file

@ -92,7 +92,7 @@ func startProfileUpdateChecker() error {
// Always increase the revision counter of the layer profile. // Always increase the revision counter of the layer profile.
// This marks previous connections in the UI as decided with outdated settings. // This marks previous connections in the UI as decided with outdated settings.
if activeProfile.layeredProfile != nil { if activeProfile.layeredProfile != nil {
activeProfile.layeredProfile.IncreaseRevisionCounter(true) activeProfile.layeredProfile.increaseRevisionCounter(true)
} }
// If the profile is saved externally (eg. via the API), have the // If the profile is saved externally (eg. via the API), have the

View file

@ -165,8 +165,9 @@ func (lp *LayeredProfile) LocalProfile() *Profile {
return lp.localProfile return lp.localProfile
} }
// RevisionCnt returns the current profile revision counter. // increaseRevisionCounter increases the revision counter and pushes the
func (lp *LayeredProfile) IncreaseRevisionCounter(lock bool) (revisionCounter uint64) { // layered profile to listeners.
func (lp *LayeredProfile) increaseRevisionCounter(lock bool) (revisionCounter uint64) {
if lp == nil { if lp == nil {
return 0 return 0
} }
@ -260,7 +261,7 @@ func (lp *LayeredProfile) Update() (revisionCounter uint64) {
lp.updateCaches() lp.updateCaches()
// bump revision counter // bump revision counter
lp.IncreaseRevisionCounter(false) lp.increaseRevisionCounter(false)
} }
return lp.RevisionCounter return lp.RevisionCounter