Simplify profile reloading

Also, increase prompt decision timeout.
This commit is contained in:
Daniel
2021-01-25 17:04:59 +01:00
parent cad957bae0
commit 9cf214fdff
12 changed files with 48 additions and 125 deletions

View File

@@ -47,7 +47,6 @@ func startProfileUpdateChecker() error {
}
module.StartServiceWorker("update active profiles", 0, func(ctx context.Context) (err error) {
feedSelect:
for {
select {
case r := <-profilesSub.Feed:
@@ -56,14 +55,6 @@ func startProfileUpdateChecker() error {
return errors.New("subscription canceled")
}
// check if internal save
if !r.IsWrapped() {
profile, ok := r.(*Profile)
if ok && profile.internalSave {
continue feedSelect
}
}
// mark as outdated
markActiveProfileAsOutdated(strings.TrimPrefix(r.Key(), profilesDBPath))
case <-ctx.Done():