iOSthemem0d

Untitled

Jan 31st, 2020
202
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. %hook WAMessageContainerView
  2. - (void)updateBubbleImageView {
  3.   %orig;
  4.  
  5.  
  6.   if (enableColor) {
  7.     return;
  8.   }
  9.  
  10.   WAMessage *message = nil;
  11.   if ([self respondsToSelector:@selector(message)]) {
  12.     message = self.message;
  13.   } else if ([self respondsToSelector:@selector(cellData)]) {
  14.     message = self.cellData.message;
  15.   }
  16.  
  17.   _WANoHighlightImageView *customBubbleImageView;
  18.   object_getInstanceVariable(self, "_bubbleImageView");
  19.   if (enableColor) {
  20.     return;
  21.   }
  22.  
  23.   customBubbleImageView.image = [customBubbleImageView.image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
  24.  
  25.   BOOL isAudioSliceView = NO;
  26.   if ([self respondsToSelector:@selector(audioSliceView)]) {
  27.     isAudioSliceView = [self audioSliceView] != nil;
  28.   } else if ([self.sliceViews count] > 0) {
  29.     isAudioSliceView = [self.sliceViews[0] isKindOfClass:%c(WAMessageAudioSliceView)];
  30.   }
  31.  
  32.   if (message.isFromMe) {
  33.     if (isAudioSliceView) {
  34.  
  35.       customBubbleImageView.tintColor = LCPParseColorString([CPSettings objectForKey:@"textColor1"], @"#FFFFFF");
  36.     } else {
  37.  
  38.       customBubbleImageView.tintColor = LCPParseColorString([CPSettings objectForKey:@"textColor1"], @"#FFFFFF");
  39.     }
  40.   } else if (!message.canBeForwarded) {
  41.  
  42.       customBubbleImageView.tintColor = LCPParseColorString([CPSettings objectForKey:@"textColor1"], @"#FFFFFF");
  43.   } else {
  44.     if (isAudioSliceView) {
  45.  
  46.       customBubbleImageView.tintColor = LCPParseColorString([CPSettings objectForKey:@"textColor1"], @"#FFFFFF");
  47.     } else {
  48.  
  49.       customBubbleImageView.tintColor = LCPParseColorString([CPSettings objectForKey:@"textColor1"], @"#FFFFFF");
  50.     }
  51.   }
  52. }
  53. %end
RAW Paste Data