mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-27 05:03:28 +00:00
Fix missing avatar by force downloading if file is missing.
This commit is contained in:
committed by
Greyson Parrelli
parent
9836185590
commit
d3ff6ba3d2
@@ -95,12 +95,12 @@ public class RetrieveProfileAvatarJob extends BaseJob {
|
||||
return;
|
||||
}
|
||||
|
||||
if (forceUpdate) {
|
||||
ProfileAvatarFileDetails details = recipient.getProfileAvatarFileDetails();
|
||||
if (!details.hasFile() || (details.getLastModified() > System.currentTimeMillis() || details.getLastModified() + MIN_TIME_BETWEEN_FORCE_RETRY < System.currentTimeMillis())) {
|
||||
Log.i(TAG, "Forcing re-download of avatar.");
|
||||
ProfileAvatarFileDetails details = recipient.getProfileAvatarFileDetails();
|
||||
if (!details.hasFile() || forceUpdate) {
|
||||
if (details.getLastModified() > System.currentTimeMillis() || details.getLastModified() + MIN_TIME_BETWEEN_FORCE_RETRY < System.currentTimeMillis()) {
|
||||
Log.i(TAG, "Forcing re-download of avatar. hasFile: " + details.hasFile());
|
||||
} else {
|
||||
Log.i(TAG, "Too early to force re-download avatar.");
|
||||
Log.i(TAG, "Too early to force re-download avatar. hasFile: " + details.hasFile());
|
||||
return;
|
||||
}
|
||||
} else if (profileAvatar != null && profileAvatar.equals(recipient.resolve().getProfileAvatar())) {
|
||||
|
||||
Reference in New Issue
Block a user