mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Removing literals and self within block.
declaring constants instead of string literals avoiding using self within block removed unused method decleration from header file Reviewed-by: @FredericJacobs
This commit is contained in:
parent
485748068f
commit
040e4c750b
3 changed files with 11 additions and 17 deletions
|
@ -25,6 +25,11 @@
|
|||
#include "TargetConditionals.h"
|
||||
#endif
|
||||
|
||||
static NSString * const kStoryboardName = @"Storyboard";
|
||||
static NSString * const kInitialViewControllerIdentifier = @"UserInitialViewController";
|
||||
static NSString * const kURLSchemeSGNLKey = @"sgnl";
|
||||
static NSString * const kURLHostVerifyPrefix = @"verify";
|
||||
|
||||
@interface AppDelegate ()
|
||||
|
||||
@property (nonatomic, retain) UIWindow *blankWindow;
|
||||
|
@ -68,8 +73,8 @@
|
|||
[DebugLogger.sharedInstance enableFileLogging];
|
||||
}
|
||||
|
||||
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Storyboard" bundle:[NSBundle mainBundle]];
|
||||
UIViewController *viewController = [storyboard instantiateViewControllerWithIdentifier:@"UserInitialViewController"];
|
||||
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:kStoryboardName bundle:[NSBundle mainBundle]];
|
||||
UIViewController *viewController = [storyboard instantiateViewControllerWithIdentifier:kInitialViewControllerIdentifier];
|
||||
|
||||
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
|
||||
self.window.rootViewController = viewController;
|
||||
|
@ -122,8 +127,8 @@
|
|||
}
|
||||
|
||||
-(BOOL) application:(UIApplication*)application openURL:(NSURL*)url sourceApplication:(NSString*)sourceApplication annotation:(id)annotation {
|
||||
if ([url.scheme isEqualToString:@"sgnl"]) {
|
||||
if ([url.host hasPrefix:@"verify"] && ![TSAccountManager isRegistered]) {
|
||||
if ([url.scheme isEqualToString:kURLSchemeSGNLKey]) {
|
||||
if ([url.host hasPrefix:kURLHostVerifyPrefix] && ![TSAccountManager isRegistered]) {
|
||||
id signupController = [Environment getCurrent].signUpFlowNavigationController;
|
||||
if ([signupController isKindOfClass:[UINavigationController class]]) {
|
||||
UINavigationController *navController = (UINavigationController*)signupController;
|
||||
|
|
|
@ -24,7 +24,4 @@
|
|||
|
||||
@property (nonatomic, retain) CallState* latestCall;
|
||||
|
||||
-(IBAction)selectedInbox:(id)sender;
|
||||
-(IBAction)selectedArchive:(id)sender;
|
||||
|
||||
@end
|
||||
|
|
|
@ -108,15 +108,6 @@ static NSString* const kShowSignupFlowSegue = @"showSignupFlow";
|
|||
[self updateInboxCountLabel];
|
||||
}
|
||||
|
||||
- (void)viewDidAppear:(BOOL)animated{
|
||||
[super viewDidAppear:animated];
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
[super didReceiveMemoryWarning];
|
||||
}
|
||||
|
||||
|
||||
-(void)tableViewSetUp
|
||||
{
|
||||
self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
|
||||
|
@ -215,8 +206,9 @@ static NSString* const kShowSignupFlowSegue = @"showSignupFlow";
|
|||
NSIndexPath *indexPath = [self.tableView indexPathForCell:cell];
|
||||
TSThread *thread = [self threadForIndexPath:indexPath];
|
||||
|
||||
BOOL viewingThreadsIn = self.viewingThreadsIn;
|
||||
[self.editingDbConnection readWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) {
|
||||
self.viewingThreadsIn == kInboxState ? [thread archiveThreadWithTransaction:transaction] : [thread unarchiveThreadWithTransaction:transaction];
|
||||
viewingThreadsIn == kInboxState ? [thread archiveThreadWithTransaction:transaction] : [thread unarchiveThreadWithTransaction:transaction];
|
||||
|
||||
}];
|
||||
[self checkIfEmptyView];
|
||||
|
|
Loading…
Reference in a new issue