|
|
@ -365,6 +365,7 @@ typedef void (^ProfileManagerFailureBlock)(NSError *error);
|
|
|
|
AnyPromise *promise = [SNFileServerAPIV2 upload:encryptedAvatarData];
|
|
|
|
AnyPromise *promise = [SNFileServerAPIV2 upload:encryptedAvatarData];
|
|
|
|
|
|
|
|
|
|
|
|
[promise.thenOn(dispatch_get_main_queue(), ^(NSString *downloadURL) {
|
|
|
|
[promise.thenOn(dispatch_get_main_queue(), ^(NSString *downloadURL) {
|
|
|
|
|
|
|
|
[NSUserDefaults.standardUserDefaults setObject:[NSDate new] forKey:@"lastProfilePictureUpload"];
|
|
|
|
[self.localUserProfile updateWithProfileKey:newProfileKey dbConnection:self.dbConnection completion:^{
|
|
|
|
[self.localUserProfile updateWithProfileKey:newProfileKey dbConnection:self.dbConnection completion:^{
|
|
|
|
successBlock(downloadURL);
|
|
|
|
successBlock(downloadURL);
|
|
|
|
}];
|
|
|
|
}];
|
|
|
|