-
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.
Merge pull request #13 from jacobcxdev/dev/v1.1.0
- Loading branch information
Showing
61 changed files
with
419 additions
and
152 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 @@ | ||
../Objective-C/Iris-Bridging-Header.h |
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,14 @@ | ||
#import <UIKit/UIKit.h> | ||
#import "IrisPreferences-Swift.h" | ||
|
||
@interface IrisFlagTagSelectionViewController : UITableViewController<UITableViewDelegate, UITableViewDataSource> | ||
@property (nonatomic, retain) NSMutableArray<IrisFlagTagButtonModel *> * _Nonnull list; | ||
@property (nonatomic, retain) NSString * _Nonnull defaults; | ||
@property (nonatomic, retain) NSString * _Nullable navBarTitle; | ||
@property (nonatomic, retain) NSString * _Nullable selectedTagUUID; | ||
@property (nonatomic) IrisConversationFlag selectedFlag; | ||
+ (instancetype _Nonnull)controllerWithTitle:(NSString * _Nullable)title defaults:(NSString * _Nonnull)defaults; | ||
- (instancetype _Nonnull)initWithTitle:(NSString * _Nullable)title defaults:(NSString * _Nonnull)defaults; | ||
- (void)loadList; | ||
- (void)saveList; | ||
@end |
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,59 @@ | ||
#import "IrisFlagTagSelectionViewController.h" | ||
#import <libJCX/Utilities.h> | ||
#import "src/Objective-C/Globals.h" | ||
|
||
@implementation IrisFlagTagSelectionViewController | ||
+ (instancetype _Nonnull)controllerWithTitle:(NSString * _Nullable)title defaults:(NSString * _Nonnull)defaults { | ||
return [[self alloc] initWithTitle:title defaults:defaults]; | ||
} | ||
- (instancetype _Nonnull)initWithTitle:(NSString * _Nullable)title defaults:(NSString * _Nonnull)defaults { | ||
if (self = [super initWithStyle:UITableViewStyleGrouped]) { | ||
_navBarTitle = title; | ||
_defaults = defaults; | ||
[self loadList]; | ||
} | ||
return self; | ||
} | ||
- (void)viewDidLoad { | ||
[super viewDidLoad]; | ||
self.navigationItem.title = _navBarTitle; | ||
} | ||
- (void)viewDidDisappear:(BOOL)animated { | ||
[super viewDidDisappear:animated]; | ||
[self saveList]; | ||
} | ||
- (void)loadList { | ||
NSUserDefaults *userDefaults = [[NSUserDefaults alloc] initWithSuiteName:_defaults]; | ||
NSData *tagsArrayData = [userDefaults dataForKey:tagsArrayKey]; | ||
NSMutableArray *tagsArray = [NSKeyedUnarchiver unarchivedObjectOfClasses:[NSSet setWithArray:@[[NSMutableArray class], [IrisConversationTag class], [NSUUID class], [NSString class], [UIColor class]]] fromData:tagsArrayData error:nil]; | ||
_list = tagsArray ? generateButtonModelsWithTags(tagsArray, false, false) : [NSMutableArray new]; | ||
_selectedFlag = [userDefaults objectForKey:defaultFlagKey] ? [[userDefaults objectForKey:defaultFlagKey] unsignedIntegerValue] : Shown; | ||
_selectedTagUUID = [userDefaults stringForKey:defaultTagUUIDKey]; | ||
} | ||
- (void)saveList { | ||
NSUserDefaults *userDefaults = [[NSUserDefaults alloc] initWithSuiteName:_defaults]; | ||
[userDefaults setObject:@(_selectedFlag) forKey:defaultFlagKey]; | ||
[userDefaults setObject:_selectedTagUUID forKey:defaultTagUUIDKey]; | ||
[[JCXNotificationCentre centre] postNotificationWithName:userDefaultsDidUpdateNotificationName to:[NSDistributedNotificationCenter defaultCenter]]; | ||
} | ||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { | ||
return _list.count; | ||
} | ||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { | ||
UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"entryCell"]; | ||
IrisFlagTagButtonModel *buttonModel = _list[indexPath.row]; | ||
cell.textLabel.text = buttonModel.name; | ||
cell.imageView.image = buttonModel.image; | ||
cell.imageView.tintColor = buttonModel.tintColour; | ||
cell.accessoryType = buttonModel.conversationFlag == _selectedFlag && ((!buttonModel.conversationTag && !_selectedTagUUID) || [buttonModel.conversationTag.uuid.UUIDString isEqualToString:_selectedTagUUID]) ? UITableViewCellAccessoryCheckmark : UITableViewCellAccessoryNone; | ||
return cell; | ||
} | ||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { | ||
[tableView deselectRowAtIndexPath:indexPath animated:true]; | ||
IrisFlagTagButtonModel *buttonModel = _list[indexPath.row]; | ||
_selectedFlag = buttonModel.conversationFlag; | ||
_selectedTagUUID = buttonModel.conversationTag.uuid.UUIDString; | ||
[tableView reloadData]; | ||
[self saveList]; | ||
} | ||
@end |
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
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
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
File renamed without changes.
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
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
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 @@ | ||
../src |
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
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 |
---|---|---|
|
@@ -7,7 +7,7 @@ Description: Put the sparkle back in 'i'Message! | |
Maintainer: JacobCXDev <[email protected]> | ||
Author: JacobCXDev <[email protected]> | ||
Section: Tweaks | ||
Version: 1.0.1 | ||
Version: 1.1.0 | ||
Tag: cydia::commercial, compatible::ios13 | ||
Icon: https://chariz.com/cdn/icon/iris/[email protected] | ||
Depiction: https://repo.chariz.com/package/com.jacobcxdev.iris/ |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.