mirror of
https://github.com/status-im/status-mobile.git
synced 2025-01-27 08:55:39 +00:00
fix community category reset on edit channel (#12804)
This commit is contained in:
parent
e16f7161c3
commit
7754f0b6a5
@ -287,7 +287,8 @@
|
|||||||
(fx/defn edit-channel
|
(fx/defn edit-channel
|
||||||
{:events [::edit-channel-confirmation-pressed]}
|
{:events [::edit-channel-confirmation-pressed]}
|
||||||
[{:keys [db] :as cofx}]
|
[{:keys [db] :as cofx}]
|
||||||
(let [{:keys [name description color community-id emoji edit-channel-id]} (get db :communities/create-channel)]
|
(let [{:keys [name description color community-id emoji edit-channel-id category-id]}
|
||||||
|
(get db :communities/create-channel)]
|
||||||
{::json-rpc/call [{:method "wakuext_editCommunityChat"
|
{::json-rpc/call [{:method "wakuext_editCommunityChat"
|
||||||
:params [community-id
|
:params [community-id
|
||||||
edit-channel-id
|
edit-channel-id
|
||||||
@ -295,6 +296,7 @@
|
|||||||
:description description
|
:description description
|
||||||
:color color
|
:color color
|
||||||
:emoji emoji}
|
:emoji emoji}
|
||||||
|
:category_id category-id
|
||||||
:permissions {:access constants/community-channel-access-no-membership}}]
|
:permissions {:access constants/community-channel-access-no-membership}}]
|
||||||
:js-response true
|
:js-response true
|
||||||
:on-success #(re-frame/dispatch [::community-channel-edited %])
|
:on-success #(re-frame/dispatch [::community-channel-edited %])
|
||||||
@ -342,7 +344,7 @@
|
|||||||
|
|
||||||
(fx/defn edit-channel-pressed
|
(fx/defn edit-channel-pressed
|
||||||
{:events [::edit-channel-pressed]}
|
{:events [::edit-channel-pressed]}
|
||||||
[{:keys [db] :as cofx} community-id chat-name description color emoji chat-id]
|
[{:keys [db] :as cofx} community-id chat-name description color emoji chat-id category-id]
|
||||||
(let [{:keys [color emoji]} (if (string/blank? emoji)
|
(let [{:keys [color emoji]} (if (string/blank? emoji)
|
||||||
(rand-nth emoji-thumbnail-styles/emoji-picker-default-thumbnails)
|
(rand-nth emoji-thumbnail-styles/emoji-picker-default-thumbnails)
|
||||||
{:color color :emoji emoji})]
|
{:color color :emoji emoji})]
|
||||||
@ -352,7 +354,8 @@
|
|||||||
:color color
|
:color color
|
||||||
:community-id community-id
|
:community-id community-id
|
||||||
:emoji emoji
|
:emoji emoji
|
||||||
:edit-channel-id chat-id})}
|
:edit-channel-id chat-id
|
||||||
|
:category-id category-id})}
|
||||||
(navigation/open-modal :edit-community-channel nil))))
|
(navigation/open-modal :edit-community-channel nil))))
|
||||||
|
|
||||||
(fx/defn community-created
|
(fx/defn community-created
|
||||||
|
@ -26,7 +26,8 @@
|
|||||||
description
|
description
|
||||||
color
|
color
|
||||||
emoji
|
emoji
|
||||||
chat-id])}])
|
chat-id
|
||||||
|
(:id category)])}])
|
||||||
:extended-header (profile-header/extended-header
|
:extended-header (profile-header/extended-header
|
||||||
{:title chat-name
|
{:title chat-name
|
||||||
:color color
|
:color color
|
||||||
|
Loading…
x
Reference in New Issue
Block a user