diff options
-rw-r--r-- | playlist.lisp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/playlist.lisp b/playlist.lisp index 4eaba3d..281b9bf 100644 --- a/playlist.lisp +++ b/playlist.lisp @@ -367,7 +367,7 @@ (thunk* (remove-editor playlist editor) (destroy editor-elem)))))) - (set-on-key-press + (set-on-blur userinput (thunk* (setf (text username-status) @@ -376,11 +376,16 @@ (set-on-click addbtn (thunk* - (when-let (user (user-with-name (value userinput))) - (add-editor playlist user) - (setf (value userinput) "" - (text username-status) "") - (create-editor-item user)))) + (let ((user (user-with-name (value userinput)))) + (cond + (user + (add-editor playlist user) + (setf (value userinput) "" + (text username-status) "") + (create-editor-item user)) + (t + (setf (text username-status) + "No user with that name")))))) (dolist (editor (playlist-editors playlist)) (create-editor-item editor)))))) |