-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{ Filter = { Bundles = ( "com.apple.springboard", "com.apple.MobileSMS" ); }; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
include theos/makefiles/common.mk | ||
|
||
TWEAK_NAME = DeleteAllMessages8 | ||
DeleteAllMessages8_FILES = Tweak.xm | ||
DeleteAllMessages8_FRAMEWORKS = UIKit CoreGraphics Foundation ChatKit | ||
DeleteAllMessages8_PRIVATE_FRAMEWORKS = ChatKit | ||
|
||
export ARCHS = armv7 arm64 | ||
|
||
include $(THEOS_MAKE_PATH)/tweak.mk | ||
|
||
after-install:: | ||
install.exec "killall -9 SpringBoard" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#import <ChatKit/ChatKit.h> | ||
|
||
%hook CKConversationListController | ||
-(void)setEditing:(BOOL)arg1 animated:(BOOL)arg2 { | ||
%orig; | ||
if(arg1) { | ||
UIBarButtonItem* deleteAll = [[UIBarButtonItem alloc] initWithTitle:@"Delete All" style:UIBarButtonItemStyleDone target:self action:@selector(alert:)]; | ||
self.navigationItem.rightBarButtonItem = deleteAll; | ||
[deleteAll release]; | ||
} else { | ||
UIBarButtonItem* compose = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCompose target:self action:@selector(composeButtonClicked:)]; | ||
self.navigationItem.rightBarButtonItem = compose; | ||
[compose release]; | ||
} | ||
} | ||
|
||
%new | ||
-(void)alert:(id)sender { | ||
UIAlertView* alert = [[UIAlertView alloc] initWithTitle:@"Are you sure?" message:nil delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Yes", nil]; | ||
[alert show]; | ||
[alert release]; | ||
} | ||
|
||
%new | ||
-(void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex { | ||
if(buttonIndex == 1) { | ||
CKConversationList* list = MSHookIvar<CKConversationList*>(self, "_conversationList"); | ||
UITableView* messages = MSHookIvar<UITableView*>(self, "_table"); | ||
NSUInteger msgCount = [(NSArray*)[list conversations] count]; | ||
while(msgCount > 0) { | ||
[list deleteConversation:[list conversations][0]]; | ||
msgCount--; | ||
} | ||
[messages reloadData]; | ||
} | ||
[self setEditing:NO animated:NO]; | ||
} | ||
%end |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Package: com.robottom.deleteallmessages8 | ||
Name: DeleteAllMessages8 | ||
Depends: firmware (>= 8.0), mobilesubstrate | ||
Version: 1.0 | ||
Architecture: iphoneos-arm | ||
Description: Delete all messages in Messages.app with the press of a button! | ||
Maintainer: Aaron Thomas <[email protected]> | ||
Author: Aaron Thomas <[email protected]> | ||
Section: Tweaks |