Compare commits

...
Author SHA1 Message Date
Mohamed Javid 223fba428c Added Request To Leave RPC call 2023-04-28 00:14:03 +05:30
Mohamed Javid 16c94d8419 Status Go Update 2023-04-28 00:13:58 +05:30
4 changed files with 31 additions and 4 deletions
+21
View File
@@ -273,6 +273,27 @@
community-id)
(re-frame/dispatch [::failed-to-leave]))}]}))
(rf/defn request-to-leave-success
{:events [:communities/request-to-leave-success]}
[{:keys [db] :as cofx} community-id]
(let [community-name (get-in db [:communities community-id :name])]
(rf/merge cofx
(toasts/upsert {:icon :i/correct
:icon-color (:positive-01 @colors/theme)
:text (i18n/label :t/request-to-leave-community
{:community community-name})}))))
(rf/defn request-to-leave
{:events [:communities/request-to-leave]}
[{:keys [db]} community-id]
{:json-rpc/call [{:method "wakuext_requestToLeaveCommunity"
:params [community-id]
:on-success #(re-frame/dispatch [:communities/request-to-leave-success community-id])
:on-error #(log/info
"failed to request to leave community"
{:error %
:event :communities/request-to-leave})}]})
(rf/defn status-tag-pressed
{:events [:communities/status-tag-pressed]}
[{:keys [db] :as cofx} community-id literal]
@@ -22,6 +22,10 @@
:size :paragraph-1
:style style/text}
(i18n/label :t/leave-community-message)]
[quo/text
{:size :paragraph-1
:style style/text}
(i18n/label :t/leave-community-note)]
[rn/view
{:style style/button-container}
[quo/button
@@ -30,7 +34,7 @@
:style style/cancel-button}
(i18n/label :t/cancel)]
[quo/button
{:on-press #(hide-sheet-and-dispatch [:communities/leave id])
{:on-press #(hide-sheet-and-dispatch [:communities/request-to-leave id])
:style style/action-button}
(i18n/label :t/leave-community)]]]])
+3 -3
View File
@@ -3,7 +3,7 @@
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
"owner": "status-im",
"repo": "status-go",
"version": "v0.148.3",
"commit-sha1": "8608aecdb495b59176afa2609c6c8efb6284cef7",
"src-sha256": "0wai1cq0mwrc6757kiyismd08fv1xzjiw99r8y31x7nrfyfl5x6l"
"version": "fix/remove-member-on-cancel-request",
"commit-sha1": "207d77e31bb02f41e133d92ab61ddebbec1e0603",
"src-sha256": "1zpbzbakqzh4m6cv8pzmxw600s9jvyak4xiiipi914f8q8bv1fcf"
}
+2
View File
@@ -850,7 +850,9 @@
"leave": "Leave",
"leave-community?": "Leave community?",
"leave-community-message": "Well be sad to see you go but remember, you can come back at any time!",
"leave-community-note": "You will be removed from the community when the community owner node is online.",
"left-community": "You left “{{community}}”",
"request-to-leave-community": "You have requested to leave “{{community}}”",
"joined": "Joined",
"leave-group": "Leave group",
"left": "left",