-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathAddInboxToChat.xm
More file actions
29 lines (22 loc) · 855 Bytes
/
AddInboxToChat.xm
File metadata and controls
29 lines (22 loc) · 855 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//
// AddInboxToChat.xm
// RedditGold
//
// Created by Tanner Bennett on 2020-04-22
// Copyright © 2020 Tanner Bennett. All rights reserved.
//
#import "Interfaces.h"
%hook AccountSettings
- (NSInteger)lastChatTabPage {
return 2; // Start on Activity tab, broken
}
%end
%hook ChatHomePagedTabViewController
- (NSArray<UIViewController *> *)viewControllersForChatTabs:(NSArray<NSNumber *> *)tabs {
NSArray<UIViewController *> *controllers = %orig(@[/* @1, */ @2, /* @3 */]); // Chat rooms were removed
// RedditService *service = [%c(AccountManager) sharedAccountManager].currentService;
InboxViewController *inbox = [[%c(InboxViewController) alloc] initWithAccountContext:self.accountContext];
// Chat rooms, chats, notifications, mail
return @[controllers[0], inbox.activityController, inbox.mailController];
}
%end