summaryrefslogtreecommitdiff
path: root/pkg/backend/api.go
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2020-08-20 20:22:48 +0200
committerkali kaneko (leap communications) <kali@leap.se>2020-08-20 20:27:50 +0200
commit2f1f352342e8e707beabd8d0c180887182e28c9a (patch)
tree073108250d64d5afbc561f6af43a4411d5e8c67a /pkg/backend/api.go
parent339a30fd1917011d8ad8a3900509f3a8880d569d (diff)
[feat] reset notification
Diffstat (limited to 'pkg/backend/api.go')
-rw-r--r--pkg/backend/api.go16
1 files changed, 14 insertions, 2 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() {