mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-25 05:29:04 +00:00
Switch to enum and theme type for MaterialColor.
// FREEBIE
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
*/
|
||||
package org.thoughtcrime.securesms.recipients;
|
||||
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
@@ -157,8 +156,8 @@ public class Recipients implements Iterable<Recipient>, RecipientModifiedListene
|
||||
else return ContactPhotoFactory.getDefaultGroupPhoto();
|
||||
}
|
||||
|
||||
public synchronized @NonNull MaterialColor getColor(Context context) {
|
||||
if (!isSingleRecipient() || isGroupRecipient()) return ContactColors.getGroupColor(context);
|
||||
public synchronized @NonNull MaterialColor getColor() {
|
||||
if (!isSingleRecipient() || isGroupRecipient()) return MaterialColor.GROUP;
|
||||
else if (isEmpty()) return ContactColors.UNKNOWN_COLOR;
|
||||
else return recipients.get(0).getColor();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user