Show "declined" for declined voice and video calls instead of "missed".

Closes #14081
Fixes #14080
This commit is contained in:
Ciphreon
2025-04-05 23:03:22 +02:00
committed by Michelle Tang
parent 2608e9165c
commit de3088f706
3 changed files with 25 additions and 12 deletions

View File

@@ -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
}
}
}

View File

@@ -267,6 +267,8 @@ public class MmsMessageRecord extends MessageRecord {
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;
}