[Fixes: #9181] Reset edit mailserver on add pressed

Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
This commit is contained in:
Andrea Maria Piana 2020-12-01 09:54:38 +01:00
parent 92aaa194a8
commit a4716cc494
No known key found for this signature in database
GPG Key ID: AA6CCA6DE0E06424
1 changed files with 4 additions and 2 deletions

View File

@ -174,8 +174,10 @@
(handlers/register-handler-fx
:mailserver.ui/add-pressed
(fn [cofx _]
(navigation/navigate-to-cofx cofx :edit-mailserver nil)))
(fn [{:keys [db] :as cofx} _]
(fx/merge cofx
{:db (dissoc db :mailserver.edit/mailserver)}
(navigation/navigate-to-cofx :edit-mailserver nil))))
(handlers/register-handler-fx
:mailserver.ui/save-pressed