Remove TextSecurePreferences.getAvatarId()

This commit is contained in:
Greyson Parrelli
2020-03-25 18:43:02 -04:00
parent 6aac3baa55
commit e6f9cb9929
15 changed files with 120 additions and 44 deletions

View File

@@ -19,6 +19,7 @@ import org.thoughtcrime.securesms.contacts.avatars.ResourceContactPhoto;
import org.thoughtcrime.securesms.mms.GlideApp;
import org.thoughtcrime.securesms.recipients.Recipient;
import org.thoughtcrime.securesms.util.TextSecurePreferences;
import org.thoughtcrime.securesms.util.Util;
public class ProfilePreference extends Preference {
@@ -68,7 +69,7 @@ public class ProfilePreference extends Preference {
final String profileName = Recipient.self().getProfileName().toString();
GlideApp.with(getContext().getApplicationContext())
.load(new ProfileContactPhoto(self.getId(), String.valueOf(TextSecurePreferences.getProfileAvatarId(getContext()))))
.load(new ProfileContactPhoto(self, self.getProfileAvatar()))
.error(new ResourceContactPhoto(R.drawable.ic_camera_solid_white_24).asDrawable(getContext(), getContext().getResources().getColor(R.color.grey_400)))
.circleCrop()
.diskCacheStrategy(DiskCacheStrategy.ALL)