File tree Expand file tree Collapse file tree 3 files changed +25
-12
lines changed
java/org/thoughtcrime/securesms
components/settings/conversation/preferences Expand file tree Collapse file tree 3 files changed +25
-12
lines changed Original file line number Diff line number Diff line change @@ -83,18 +83,25 @@ object CallPreference {
8383
8484 @StringRes
8585 private fun getMissedCallString (isVideo : Boolean , callEvent : CallTable .Event ): Int {
86- return if (callEvent == CallTable .Event .MISSED_NOTIFICATION_PROFILE ) {
87- if (isVideo) {
88- R .string.MessageRecord_missed_video_call_notification_profile
89- } else {
90- R .string.MessageRecord_missed_voice_call_notification_profile
91- }
92- } else {
93- if (isVideo) {
94- R .string.MessageRecord_missed_video_call
95- } else {
96- R .string.MessageRecord_missed_voice_call
97- }
86+ return when (callEvent) {
87+ CallTable .Event .MISSED_NOTIFICATION_PROFILE ->
88+ if (isVideo) {
89+ R .string.MessageRecord_missed_video_call_notification_profile
90+ } else {
91+ R .string.MessageRecord_missed_voice_call_notification_profile
92+ }
93+ CallTable .Event .NOT_ACCEPTED ->
94+ if (isVideo) {
95+ R .string.MessageRecord_declined_video_call
96+ } else {
97+ R .string.MessageRecord_declined_voice_call
98+ }
99+ else ->
100+ if (isVideo) {
101+ R .string.MessageRecord_missed_video_call
102+ } else {
103+ R .string.MessageRecord_missed_voice_call
104+ }
98105 }
99106 }
100107
Original file line number Diff line number Diff line change @@ -267,6 +267,8 @@ public SpannableString getDisplayBody(@NonNull Context context) {
267267 int message ;
268268 if (call .getEvent () == CallTable .Event .MISSED_NOTIFICATION_PROFILE ) {
269269 message = isVideoCall ? R .string .MessageRecord_missed_video_call_notification_profile : R .string .MessageRecord_missed_voice_call_notification_profile ;
270+ } else if (call .getEvent () == CallTable .Event .NOT_ACCEPTED ){
271+ message = isVideoCall ? R .string .MessageRecord_declined_video_call : R .string .MessageRecord_declined_voice_call ;
270272 } else {
271273 message = isVideoCall ? R .string .MessageRecord_missed_video_call : R .string .MessageRecord_missed_voice_call ;
272274 }
Original file line number Diff line number Diff line change 17871787 <string name="MessageRecord_missed_voice_call">Missed voice call</string>
17881788 <!-- Update message shown when receiving an incoming 1:1 video call and not answered -->
17891789 <string name="MessageRecord_missed_video_call">Missed video call</string>
1790+ <!-- Update message shown when receiving an incoming 1:1 voice/audio call and not answered -->
1791+ <string name="MessageRecord_declined_voice_call">Declined voice call</string>
1792+ <!-- Update message shown when receiving an incoming 1:1 video call and not answered -->
1793+ <string name="MessageRecord_declined_video_call">Declined video call</string>
17901794 <!-- Update message shown when receiving an incoming voice call and declined due to notification profile -->
17911795 <string name="MessageRecord_missed_voice_call_notification_profile">Missed voice call while notification profile on</string>
17921796 <!-- Update message shown when receiving an incoming video call and declined due to notification profile -->
You can’t perform that action at this time.
0 commit comments