diff options
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/backend/api.go | 16 | ||||
-rw-r--r-- | pkg/backend/init.go | 7 |
2 files changed, 14 insertions, 9 deletions
diff --git a/pkg/backend/api.go b/pkg/backend/api.go index 7aa5527..125f7f5 100644 --- a/pkg/backend/api.go +++ b/pkg/backend/api.go @@ -86,8 +86,20 @@ func RefreshContext() *C.char { } func ResetError(errname string) { - log.Println("DEBUG: resetting error", errname) - resetErrors(errname) + if ctx.Errors == errname { + ctx.Errors = "" + } +} + +func ResetNotification(label string) { + switch label { + case "login_ok": + ctx.LoginOk = false + break + default: + break + } + go trigger(OnStatusChanged) } func InstallHelpers() { diff --git a/pkg/backend/init.go b/pkg/backend/init.go index af43bab..be4427a 100644 --- a/pkg/backend/init.go +++ b/pkg/backend/init.go @@ -40,13 +40,6 @@ func checkErrors(errCh chan string) { } } -func resetErrors(errname string) { - if ctx.Errors == errname { - ctx.Errors = "" - log.Println("DEBUG: reset error", errname) - } -} - func initializeBitmask(errCh chan string, opts *InitOpts) { if ctx == nil { log.Println("bug: cannot initialize bitmask, ctx is nil!") |