Skip to content

Commit

Permalink
V2.6.4
Browse files Browse the repository at this point in the history
  • Loading branch information
MustangYM committed Aug 12, 2020
1 parent 8e5e5f6 commit 392e022
Show file tree
Hide file tree
Showing 17 changed files with 40 additions and 11 deletions.
Binary file modified WeChatExtension/.DS_Store
Binary file not shown.
Binary file modified WeChatExtension/Rely/Plugin/WeChatExtension.zip
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>18E226</string>
<string>19F101</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
Expand All @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.6.3</string>
<string>2.6.4</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
Expand All @@ -27,24 +27,24 @@
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>11B500</string>
<string>11C504</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>19B89</string>
<string>19B90</string>
<key>DTSDKName</key>
<string>macosx10.15</string>
<key>DTXcode</key>
<string>1120</string>
<string>1130</string>
<key>DTXcodeBuild</key>
<string>11B500</string>
<string>11C504</string>
<key>LSMinimumSystemVersion</key>
<string>10.10</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2019年 WeChatExtension. All rights reserved.</string>
<key>showUpdateWindow</key>
<true/>
<key>versionInfo</key>
<string>v2.6.3(2020-07-27):\n👉🏻 紧急适配2.4.2免认证登录后会话一片空白\n👉🏻 修复会话标题在某些情况显示不全\n</string>
<string>v2.6.4(2020-08-13):\n👉🏻 聊天输入框/表情选择/收藏界面图标优化\n👉🏻 修复联系人列表/详情页面若干BUG\n</string>
</dict>
</plist>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions WeChatExtension/WeChatExtension/Base.lproj/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.6.3</string>
<string>2.6.4</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSHumanReadableCopyright</key>
Expand All @@ -25,6 +25,6 @@
<key>showUpdateWindow</key>
<true/>
<key>versionInfo</key>
<string>v2.6.3(2020-07-27):\n👉🏻 紧急适配2.4.2免认证登录后会话一片空白\n👉🏻 修复会话标题在某些情况显示不全\n</string>
<string>v2.6.4(2020-08-13):\n👉🏻 聊天输入框/表情选择/收藏界面图标优化\n👉🏻 修复联系人列表/详情页面若干BUG\n</string>
</dict>
</plist>
22 changes: 22 additions & 0 deletions WeChatExtension/WeChatExtension/Sources/Hook/NSObject+ThemeHook.m
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,23 @@ + (void)hookTheme
hookMethod(objc_getClass("MMSidebarContactRowView"), NSSelectorFromString(@"_updateSelectionAppearance:"), [self class], @selector(hook_updateSelectionAppearance:));
hookMethod(objc_getClass("MMFavSidebarHeaderRowView"), NSSelectorFromString(@"initWithFrame:"), [self class], @selector(hook_sideBarHeaderInitWithFrame:));
hookMethod(objc_getClass("MMFavSidebarRowView"), NSSelectorFromString(@"initWithFrame:"), [self class], @selector(hook_sideBarRowInitWithFrame:));
hookMethod(objc_getClass("MMContactsDetailViewController"), @selector(sendMsgButton), [self class], @selector(hook_sendMsgButton));
}
}

- (id)hook_sendMsgButton
{
NSButton *btn = [self hook_sendMsgButton];
if ([TKWeChatPluginConfig sharedConfig].usingTheme) {
dispatch_async(dispatch_get_main_queue(), ^{
btn.layer.cornerRadius = 5;
btn.layer.borderColor = TK_RGBA(6, 193, 96, 0.2).CGColor;
btn.layer.borderWidth = 2;
});
}
return btn;
}

- (id)hook_sideBarRowInitWithFrame:(struct CGRect)arg1
{
MMFavSidebarRowView *rowView = [self hook_sideBarRowInitWithFrame:arg1];
Expand Down Expand Up @@ -809,6 +823,14 @@ - (void)hook_themeViewDidLoad
return;
}


if ([self isKindOfClass:objc_getClass("MMContactsDetailViewController")]) {
MMContactsDetailViewController *contactsVC = (MMContactsDetailViewController *)self;
if (!contactsVC.currContactData) {
contactsVC.contactNameLabel.stringValue = @"";
}
}

NSViewController *viewController = (NSViewController *)self;
[[YMThemeManager shareInstance] changeTheme:viewController.view];
[YMFuzzyManager fuzzyViewController:viewController];
Expand Down
3 changes: 2 additions & 1 deletion WeChatExtension/WeChatExtension/Sources/Hook/WeChat+hook.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#import<CommonCrypto/CommonDigest.h>
#import "YMIMContactsManager.h"
#import "ANYMethodLog.h"
#import "NSViewLayoutTool.h"

@implementation NSObject (WeChatHook)

Expand Down Expand Up @@ -105,7 +106,7 @@ + (void)hookWeChat {
}, 2);

[self setup];

}

- (void)hook_addChatMemberNeedVerifyMsg:(id)arg1 ContactList:(id)arg2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,12 @@ + (void)fuzzyViewController:(NSViewController *)viewController
return;
}

if ([viewController isKindOfClass:objc_getClass("MMChatCollectionViewController")] || [viewController isKindOfClass:objc_getClass("MMSessionListView")]) {
//联系人详情单独处理
if ([viewController isKindOfClass:objc_getClass("MMContactsDetailViewController")]) {
return;
}

if ([viewController isKindOfClass:objc_getClass("MMChatCollectionViewController")] || [viewController isKindOfClass:objc_getClass("MMSessionListView")] || [viewController isKindOfClass:objc_getClass("MMStickerCollectionViewController")] || [viewController isKindOfClass:objc_getClass("MMContactProfileController")]) {
NSVisualEffectView *effView = [YMThemeManager creatFuzzyEffectView:viewController.view];
if (viewController.view.subviews.count > 0) {
NSView *firstSubView = viewController.view.subviews[0];
Expand Down
1 change: 1 addition & 0 deletions WeChatExtension/WeChatExtension/WeChatPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,7 @@ forHTTPHeaderField:(NSString *)field;
@property(retain, nonatomic) MMView *placeHolderView; // @synthesize placeHolderView=_placeHolderView;
@property(retain, nonatomic) NSView *detailContainerView; // @synthesize detailContainerView=_detailContainerView;
@property(nonatomic) __weak NSScrollView *scrollViewContainer; // @synthesize scrollViewContainer=_scrollViewContainer;
@property(retain, nonatomic) NSButton *sendMsgButton; // @synthesize sendMsgButton=_sendMsgButton;
@end

@interface MMFavoriteCollectionView : NSCollectionView
Expand Down

0 comments on commit 392e022

Please sign in to comment.