mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-09 19:28:35 +00:00
Added additional logging in RetrieveProfileJob.
This commit is contained in:
parent
8772214fd4
commit
49ecd9ef5d
@ -81,6 +81,8 @@ public class RetrieveProfileJob extends BaseJob {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRun() throws IOException {
|
public void onRun() throws IOException {
|
||||||
|
Log.i(TAG, "Retrieving profile of " + recipient.getId());
|
||||||
|
|
||||||
Recipient resolved = recipient.resolve();
|
Recipient resolved = recipient.resolve();
|
||||||
|
|
||||||
if (resolved.isGroup()) handleGroupRecipient(resolved);
|
if (resolved.isGroup()) handleGroupRecipient(resolved);
|
||||||
@ -103,6 +105,12 @@ public class RetrieveProfileJob extends BaseJob {
|
|||||||
private void handlePhoneNumberRecipient(Recipient recipient) throws IOException {
|
private void handlePhoneNumberRecipient(Recipient recipient) throws IOException {
|
||||||
SignalServiceProfile profile = ProfileUtil.retrieveProfile(context, recipient);
|
SignalServiceProfile profile = ProfileUtil.retrieveProfile(context, recipient);
|
||||||
|
|
||||||
|
if (recipient.getProfileKey() == null) {
|
||||||
|
Log.i(TAG, "No profile key for available for " + recipient.getId());
|
||||||
|
} else {
|
||||||
|
Log.i(TAG, "Profile key available for " + recipient.getId());
|
||||||
|
}
|
||||||
|
|
||||||
setProfileName(recipient, profile.getName());
|
setProfileName(recipient, profile.getName());
|
||||||
setProfileAvatar(recipient, profile.getAvatar());
|
setProfileAvatar(recipient, profile.getAvatar());
|
||||||
if (FeatureFlags.USERNAMES) setUsername(recipient, profile.getUsername());
|
if (FeatureFlags.USERNAMES) setUsername(recipient, profile.getUsername());
|
||||||
@ -196,6 +204,8 @@ public class RetrieveProfileJob extends BaseJob {
|
|||||||
|
|
||||||
if (!Util.equals(profileAvatar, recipient.getProfileAvatar())) {
|
if (!Util.equals(profileAvatar, recipient.getProfileAvatar())) {
|
||||||
ApplicationDependencies.getJobManager().add(new RetrieveProfileAvatarJob(recipient, profileAvatar));
|
ApplicationDependencies.getJobManager().add(new RetrieveProfileAvatarJob(recipient, profileAvatar));
|
||||||
|
} else {
|
||||||
|
Log.d(TAG, "Skipping avatar fetch for " + recipient.getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user