2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-30 21:55:10 +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,9 +123,12 @@ public class SmsMmsUtils {
}
if (sendingPhoneNumber.number != null) {
// If the message is going to more than one target (to allow the user to send a message to themselves)
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 {
Settings settings = new Settings();