Disable networking calls when updating profile.

Remove avatar from profile controller.
pull/2/head
Mikunj 6 years ago
parent 19dd766713
commit 520d41565f

@ -153,7 +153,9 @@ NSString *const kProfileView_LastPresentedDate = @"kProfileView_LastPresentedDat
[avatarRow
addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(avatarRowTapped:)]];
avatarRow.accessibilityIdentifier = ACCESSIBILITY_IDENTIFIER_WITH_NAME(self, @"avatarRow");
[rows addObject:avatarRow];
// Loki - Disable setting the avatar
// [rows addObject:avatarRow];
UILabel *avatarLabel = [UILabel new];
avatarLabel.text = NSLocalizedString(

@ -293,7 +293,12 @@ typedef void (^ProfileManagerFailureBlock)(NSError *error);
OWSUserProfile *userProfile = self.localUserProfile;
OWSAssertDebug(userProfile);
/* LOKI - We don't support avatar uploads yet */
OWSLogVerbose(@"Updating local profile on service with no avatar.");
tryToUpdateService(nil, nil);
/* ========== Original Code ===============
if (avatarImage) {
// If we have a new avatar image, we must first:
//
@ -338,6 +343,7 @@ typedef void (^ProfileManagerFailureBlock)(NSError *error);
OWSLogVerbose(@"Updating local profile on service with no avatar.");
tryToUpdateService(nil, nil);
}
*/
}
- (void)writeAvatarToDisk:(UIImage *)avatar
@ -528,7 +534,11 @@ typedef void (^ProfileManagerFailureBlock)(NSError *error);
failure:(ProfileManagerFailureBlock)failureBlock {
OWSAssertDebug(successBlock);
OWSAssertDebug(failureBlock);
// Since we don't need to call any servers, automatically succeed
successBlock();
/* ============ Original Code ==================
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
NSData *_Nullable encryptedPaddedName = [self encryptProfileNameWithUnpaddedName:localProfileName];
@ -542,6 +552,7 @@ typedef void (^ProfileManagerFailureBlock)(NSError *error);
failureBlock(error);
}];
});
*/
}
- (void)fetchLocalUsersProfile

Loading…
Cancel
Save