2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-31 14:15:14 +00:00

[SMS Plugin] Don't remove the sending address if it is the only thing in the list

This commit is contained in:
Simon Redman
2021-09-06 15:22:14 -07:00
parent a1fb54faf1
commit 23b8d2e70b

View File

@@ -123,8 +123,11 @@ public class SmsMmsUtils {
} }
if (sendingPhoneNumber.number != null) { if (sendingPhoneNumber.number != null) {
// Remove the user's phone number if present in the list of recipients // If the message is going to more than one target (to allow the user to send a message to themselves)
addressList.removeIf(address -> sendingPhoneNumber.isMatchingPhoneNumber(address.address)); if (addressList.size() > 1) {
// Remove the user's phone number if present in the list of recipients
addressList.removeIf(address -> sendingPhoneNumber.isMatchingPhoneNumber(address.address));
}
} }
try { try {