Add extra conditions for the SMS banner.

This commit is contained in:
Greyson Parrelli
2021-01-08 17:31:54 -05:00
committed by Alan Evans
parent ae5f9fb8ac
commit 3739eb7731
2 changed files with 8 additions and 1 deletions

View File

@@ -110,6 +110,12 @@ public class PhoneNumberFormatter {
}
}
public static int getLocalCountryCode() {
Optional<PhoneNumber> localNumber = get(ApplicationDependencies.getApplication()).localNumber;
return localNumber != null && localNumber.isPresent() ? localNumber.get().countryCode : 0;
}
public String format(@Nullable String number) {
if (number == null) return "Unknown";
if (GroupId.isEncodedGroup(number)) return number;