From 2f1f352342e8e707beabd8d0c180887182e28c9a Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Thu, 20 Aug 2020 20:22:48 +0200 Subject: [feat] reset notification --- pkg/backend/api.go | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'pkg/backend/api.go') 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() { -- cgit v1.2.3