mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-25 03:09:05 +00:00
Fix crash when creating group with no avatar icon
Fixes #4320 // FREEBIE
This commit is contained in:
@@ -43,8 +43,8 @@ public class Recipient {
|
||||
|
||||
private final long recipientId;
|
||||
|
||||
private String number;
|
||||
private String name;
|
||||
private @NonNull String number;
|
||||
private @Nullable String name;
|
||||
private boolean stale;
|
||||
|
||||
private ContactPhoto contactPhoto;
|
||||
@@ -123,7 +123,7 @@ public class Recipient {
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
public String getNumber() {
|
||||
public @NonNull String getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
|
||||
@@ -58,11 +58,11 @@ public class RecipientFactory {
|
||||
return provider.getRecipients(context, ids, asynchronous);
|
||||
}
|
||||
|
||||
public static Recipient getRecipientForId(Context context, long recipientId, boolean asynchronous) {
|
||||
public @NonNull static Recipient getRecipientForId(Context context, long recipientId, boolean asynchronous) {
|
||||
return provider.getRecipient(context, recipientId, asynchronous);
|
||||
}
|
||||
|
||||
public static Recipients getRecipientsForIds(Context context, long[] recipientIds, boolean asynchronous) {
|
||||
public @NonNull static Recipients getRecipientsForIds(Context context, long[] recipientIds, boolean asynchronous) {
|
||||
return provider.getRecipients(context, recipientIds, asynchronous);
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ public class RecipientProvider {
|
||||
ContactColors.UNKNOWN_COLOR));
|
||||
}};
|
||||
|
||||
Recipient getRecipient(Context context, long recipientId, boolean asynchronous) {
|
||||
@NonNull Recipient getRecipient(Context context, long recipientId, boolean asynchronous) {
|
||||
Recipient cachedRecipient = recipientCache.get(recipientId);
|
||||
if (cachedRecipient != null && !cachedRecipient.isStale()) return cachedRecipient;
|
||||
|
||||
@@ -86,7 +86,7 @@ public class RecipientProvider {
|
||||
return cachedRecipient;
|
||||
}
|
||||
|
||||
Recipients getRecipients(Context context, long[] recipientIds, boolean asynchronous) {
|
||||
@NonNull Recipients getRecipients(Context context, long[] recipientIds, boolean asynchronous) {
|
||||
Recipients cachedRecipients = recipientsCache.get(new RecipientIds(recipientIds));
|
||||
if (cachedRecipients != null && !cachedRecipients.isStale()) return cachedRecipients;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user