File tree Expand file tree Collapse file tree 3 files changed +12
-29
lines changed Expand file tree Collapse file tree 3 files changed +12
-29
lines changed Original file line number Diff line number Diff line change 209
209
210
210
(fx/defn ui-leave-chat-pressed
211
211
{:events [:group-chats.ui/leave-chat-pressed ]}
212
- [_ chat-id]
213
- {:ui/show-confirmation
214
- {:title (i18n/label :t/leave-confirmation )
215
- :content (i18n/label :t/leave-chat-confirmation )
216
- :confirm-button-text (i18n/label :t/leave )
217
- :on-accept #(do
218
- (re-frame/dispatch [:bottom-sheet/hide ])
219
- (re-frame/dispatch [:group-chats.ui/leave-chat-confirmed chat-id]))}})
212
+ [{:keys [db]} chat-id]
213
+ (let [chat-name (get-in db [:chats chat-id :name ])]
214
+ {:ui/show-confirmation
215
+ {:title (i18n/label :t/leave-confirmation {:chat-name chat-name})
216
+ :content (i18n/label :t/leave-chat-confirmation )
217
+ :confirm-button-text (i18n/label :t/leave )
218
+ :on-accept #(do
219
+ (re-frame/dispatch [:bottom-sheet/hide ])
220
+ (re-frame/dispatch [:group-chats.ui/leave-chat-confirmed chat-id]))}}))
Original file line number Diff line number Diff line change 35
35
:accessibility-label :mark-all-read-button
36
36
:icon :main-icons/check
37
37
:on-press #(hide-sheet-and-dispatch [:chat.ui/mark-all-read-pressed chat-id])}]
38
- [quo/list-item
39
- {:theme :accent
40
- :title (i18n/label :t/clear-history )
41
- :accessibility-label :clear-history-button
42
- :icon :main-icons/close
43
- :on-press #(re-frame/dispatch [:chat.ui/clear-history-pressed chat-id])}]
44
38
[quo/list-item
45
39
{:theme :negative
46
40
:title (i18n/label :t/delete-chat )
105
99
:title (i18n/label :t/mark-all-read )
106
100
:accessibility-label :mark-all-read-button
107
101
:icon :main-icons/check
108
- :on-press #(hide-sheet-and-dispatch [:chat.ui/mark-all-read-pressed chat-id])}]
109
- [quo/list-item
110
- {:theme :accent
111
- :title (i18n/label :t/clear-history )
112
- :accessibility-label :clear-history-button
113
- :icon :main-icons/close
114
- :on-press #(re-frame/dispatch [:chat.ui/clear-history-pressed chat-id])}]]))
102
+ :on-press #(hide-sheet-and-dispatch [:chat.ui/mark-all-read-pressed chat-id])}]]))
115
103
116
104
(defn group-chat-accents []
117
105
(fn [{:keys [chat-id group-chat chat-name color invitation-admin]}]
141
129
:accessibility-label :mark-all-read-button
142
130
:icon :main-icons/check
143
131
:on-press #(hide-sheet-and-dispatch [:chat.ui/mark-all-read-pressed chat-id])}]
144
- [quo/list-item
145
- {:theme :accent
146
- :title (i18n/label :t/clear-history )
147
- :accessibility-label :clear-history-button
148
- :icon :main-icons/close
149
- :on-press #(re-frame/dispatch [:chat.ui/clear-history-pressed chat-id])}]
150
132
(when joined?
151
133
[quo/list-item
152
134
{:theme :negative
Original file line number Diff line number Diff line change 595
595
"group-chat-name-changed" : " **{{member}}** changed the group's name to **{{name}}**" ,
596
596
"group-chat-no-contacts" : " You don't have any contacts yet.\n Invite your friends to start chatting" ,
597
597
"leave-chat" :" Leave chat" ,
598
- "leave-confirmation" : " Leave chat" ,
599
- "leave-chat-confirmation" : " Are you sure you want to leave the chat? " ,
598
+ "leave-confirmation" : " Leave {{ chat-name}} " ,
599
+ "leave-chat-confirmation" : " Chat history will be removed from your device. After rejoining you won't be able to retrieve any of your history. " ,
600
600
"group-chat-all-contacts-invited" : " All your contacts are already in the group" ,
601
601
"group-info" : " Group info" ,
602
602
"gwei" : " Gwei" ,
You can’t perform that action at this time.
0 commit comments