mirror of
https://github.com/DKJone/DKWechatHelper.git
synced 2026-07-29 06:12:07 +08:00
[v1.0.6](https://github.com/DKWechatHelper/DKWechatHelper/releases/tag/1.0.6) / 2020-10-16
what's new * 朋友圈转发 * 支持7.0.17 * 更新越狱包7.0.17 * 更新已注入助手的7.0.17未签名包 * 更新越狱源安装包
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -426,15 +426,61 @@
|
||||
}
|
||||
%end
|
||||
|
||||
%hook CContact
|
||||
- (BOOL)isEqual:(CContact *)other
|
||||
{
|
||||
return [other.m_nsUsrName isEqual: self.m_nsUsrName];
|
||||
%hook WCOperateFloatView
|
||||
|
||||
%new
|
||||
-(UIButton *)m_shareBtn{
|
||||
static char m_shareBtnKey;
|
||||
UIButton * btn = objc_getAssociatedObject(self, &m_shareBtnKey);
|
||||
if (!btn) {
|
||||
btn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[btn setTitle:@" 转发" forState:UIControlStateNormal];
|
||||
[btn addTarget:self action:@selector(forwordTimeLine:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[btn setTitleColor:self.m_likeBtn.currentTitleColor forState:0];
|
||||
btn.titleLabel.font = self.m_likeBtn.titleLabel.font;
|
||||
[self.m_likeBtn.superview addSubview:btn];
|
||||
NSString *base64Str = @"iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABf0lEQVQ4T62UvyuFYRTHP9/JJimjMpgYTBIDd5XEIIlB9x+Q5U5+xEIZLDabUoQsNtS9G5MyXImk3EHK/3B09Ly31/X+cG9Onek5z+c5z/l+n0f8c+ivPDMrAAVJG1l7mgWWgc0saCvAKnCWBm0F2A+cpEGbBkqSmfWlQXOBZjbgYgCDwIIDXZQ0aCrQzOaAZWAIuAEugaqk00jlJOgvYChaA6aAFeBY0nuaVRqhP4CxxQ9gVZJ3lhs/oAnt1ySN51JiBWa2FMYzW+/QzNwK3cCkpM+/As1sAjgAZiRVIsWKwHZ4Wo9NwFz5W2Ba0oXvi4Cu4L2kUrBEOzAMjIXsAjw7YrbpBZ6BeUlHURNu0h7gFXC/vQRlveM34AF4AipAG1AOxu4Me0qS9uM3cqB7bRS4A3y4556SvOt6hN8mAnrtoaTdxvE40H+QEcBP2pFUS5phBASu3eiS1pPqIuCWpKssMWLAPUl+k8T4fuiSfFaZEYBFSYtZhbmfQ95Bjetfmweww0YOfToAAAAASUVORK5CYII=";
|
||||
NSData *imageData = [[NSData alloc] initWithBase64EncodedString:base64Str options:NSDataBase64DecodingIgnoreUnknownCharacters];
|
||||
UIImage *image = [UIImage imageWithData:imageData ];
|
||||
[btn setImage:image forState:0];
|
||||
[btn setTintColor:self.m_likeBtn.tintColor];
|
||||
objc_setAssociatedObject(self, &m_shareBtnKey, btn, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
|
||||
|
||||
}
|
||||
return btn;
|
||||
}
|
||||
|
||||
%new
|
||||
-(UIImageView *)m_lineView2{
|
||||
static char m_lineView2Key;
|
||||
UIImageView * imageView = objc_getAssociatedObject(self, &m_lineView2Key);
|
||||
if (!imageView) {
|
||||
imageView = [[UIImageView alloc] initWithImage:MSHookIvar<UIImageView *>(self, "m_lineView").image];
|
||||
[self.m_likeBtn.superview addSubview: imageView];
|
||||
objc_setAssociatedObject(self, &m_lineView2Key, imageView, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
|
||||
}
|
||||
return imageView;
|
||||
}
|
||||
|
||||
- (void)showWithItemData:(id)arg1 tipPoint:(struct CGPoint)arg2{
|
||||
%orig(arg1,arg2);
|
||||
if (DKHelperConfig.timeLineForwardEnable){
|
||||
self.frame = CGRectOffset(CGRectInset(self.frame, self.frame.size.width / -4, 0),self.frame.size.width / -4,0);
|
||||
self.m_shareBtn.frame = CGRectOffset(self.m_likeBtn.frame, self.m_likeBtn.frame.size.width * 2, 0);
|
||||
self.m_lineView2.frame = CGRectOffset(MSHookIvar<UIImageView *>(self, "m_lineView").frame, [self buttonWidth:self.m_likeBtn], 0);
|
||||
}
|
||||
}
|
||||
|
||||
%new
|
||||
- (void)forwordTimeLine:(id)arg1{
|
||||
WCForwardViewController *forwardVC = [[objc_getClass("WCForwardViewController") alloc] initWithDataItem:self.m_item];
|
||||
[self.navigationController pushViewController:forwardVC animated:true];
|
||||
}
|
||||
|
||||
%end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//%hook ScanQRCodeResultsMgr
|
||||
//- (void)retryRequetScanResult:(id)arg1 viewController:(id)arg2{
|
||||
// %orig;
|
||||
//}
|
||||
//%end
|
||||
|
||||
Reference in New Issue
Block a user