From 339ceae33e6555f5b447f0d91de43fc3f75da14b Mon Sep 17 00:00:00 2001 From: Roman Volosovskyi Date: Fri, 21 Oct 2016 10:46:51 +0300 Subject: [PATCH] fix realm error at group leaving Former-commit-id: 18452c9bd94f70e37f7b5056f50c201a4a2f5757 --- src/status_im/data_store/realm/chats.cljs | 3 +-- src/status_im/data_store/realm/messages.cljs | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/status_im/data_store/realm/chats.cljs b/src/status_im/data_store/realm/chats.cljs index a1dd73cc81..d90b04e6e5 100644 --- a/src/status_im/data_store/realm/chats.cljs +++ b/src/status_im/data_store/realm/chats.cljs @@ -96,8 +96,7 @@ (defn remove-contacts [chat-id identities] (let [contacts (get-contacts chat-id)] - (realm/write @realm/account-realm - #(delete-contacts identities contacts)))) + (delete-contacts identities contacts))) (defn save-property [chat-id property-name value] diff --git a/src/status_im/data_store/realm/messages.cljs b/src/status_im/data_store/realm/messages.cljs index 787885ff02..0d5bb7cf9f 100644 --- a/src/status_im/data_store/realm/messages.cljs +++ b/src/status_im/data_store/realm/messages.cljs @@ -49,6 +49,5 @@ (defn delete-by-chat-id [chat-id] - (realm/write @realm/account-realm - #(realm/delete @realm/account-realm - (get-by-chat-id chat-id)))) \ No newline at end of file + (realm/delete @realm/account-realm + (get-by-chat-id chat-id)))