Request profile fetches on main thread.

This commit is contained in:
Matthew Chen 2018-10-31 15:01:33 -04:00
parent ec2478645d
commit 3729398507
2 changed files with 6 additions and 2 deletions

View file

@ -1483,7 +1483,9 @@ NS_ASSUME_NONNULL_BEGIN
(unsigned long) envelope.sourceDevice);
[OWSDevicesService refreshDevices];
[self.profileManager fetchLocalUsersProfile];
dispatch_async(dispatch_get_main_queue(), ^{
[self.profileManager fetchLocalUsersProfile];
});
}
}

View file

@ -225,6 +225,8 @@ public class RequestMaker: NSObject {
// mark recipient as .enabled.
udManager.setUnidentifiedAccessMode(.enabled, recipientId: recipientId)
}
profileManager.fetchProfile(forRecipientId: recipientId)
DispatchQueue.main.async {
self.profileManager.fetchProfile(forRecipientId: self.recipientId)
}
}
}