diff --git a/Signal/src/ViewControllers/ProfileViewController.m b/Signal/src/ViewControllers/ProfileViewController.m index a7599556a..d16e05c14 100644 --- a/Signal/src/ViewControllers/ProfileViewController.m +++ b/Signal/src/ViewControllers/ProfileViewController.m @@ -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( diff --git a/SignalMessaging/profiles/OWSProfileManager.m b/SignalMessaging/profiles/OWSProfileManager.m index e3a723a61..564485d8b 100644 --- a/SignalMessaging/profiles/OWSProfileManager.m +++ b/SignalMessaging/profiles/OWSProfileManager.m @@ -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