Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,25 @@ object CallPreference {

@StringRes
private fun getMissedCallString(isVideo: Boolean, callEvent: CallTable.Event): Int {
return if (callEvent == CallTable.Event.MISSED_NOTIFICATION_PROFILE) {
if (isVideo) {
R.string.MessageRecord_missed_video_call_notification_profile
} else {
R.string.MessageRecord_missed_voice_call_notification_profile
}
} else {
if (isVideo) {
R.string.MessageRecord_missed_video_call
} else {
R.string.MessageRecord_missed_voice_call
}
return when (callEvent) {
CallTable.Event.MISSED_NOTIFICATION_PROFILE ->
if (isVideo) {
R.string.MessageRecord_missed_video_call_notification_profile
} else {
R.string.MessageRecord_missed_voice_call_notification_profile
}
CallTable.Event.NOT_ACCEPTED ->
if (isVideo) {
R.string.MessageRecord_declined_video_call
} else {
R.string.MessageRecord_declined_voice_call
}
else ->
if (isVideo) {
R.string.MessageRecord_missed_video_call
} else {
R.string.MessageRecord_missed_voice_call
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ public SpannableString getDisplayBody(@NonNull Context context) {
int message;
if (call.getEvent() == CallTable.Event.MISSED_NOTIFICATION_PROFILE) {
message = isVideoCall ? R.string.MessageRecord_missed_video_call_notification_profile : R.string.MessageRecord_missed_voice_call_notification_profile;
} else if (call.getEvent() == CallTable.Event.NOT_ACCEPTED){
message = isVideoCall ? R.string.MessageRecord_declined_video_call : R.string.MessageRecord_declined_voice_call;
} else {
message = isVideoCall ? R.string.MessageRecord_missed_video_call : R.string.MessageRecord_missed_voice_call;
}
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1787,6 +1787,10 @@
<string name="MessageRecord_missed_voice_call">Missed voice call</string>
<!-- Update message shown when receiving an incoming 1:1 video call and not answered -->
<string name="MessageRecord_missed_video_call">Missed video call</string>
<!-- Update message shown when receiving an incoming 1:1 voice/audio call and not accepted -->
<string name="MessageRecord_declined_voice_call">Declined voice call</string>
<!-- Update message shown when receiving an incoming 1:1 video call and not accepted -->
<string name="MessageRecord_declined_video_call">Declined video call</string>
<!-- Update message shown when receiving an incoming voice call and declined due to notification profile -->
<string name="MessageRecord_missed_voice_call_notification_profile">Missed voice call while notification profile on</string>
<!-- Update message shown when receiving an incoming video call and declined due to notification profile -->
Expand Down