Clean up ahead of PR.
This commit is contained in:
parent
ffa69b3502
commit
66fae5bd54
|
@ -35,6 +35,7 @@
|
|||
348F2EAE1F0D21BC00D4ECE0 /* DeviceSleepManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 348F2EAD1F0D21BC00D4ECE0 /* DeviceSleepManager.swift */; };
|
||||
3497DBEC1ECE257500DB2605 /* OWSCountryMetadata.m in Sources */ = {isa = PBXBuildFile; fileRef = 3497DBEB1ECE257500DB2605 /* OWSCountryMetadata.m */; };
|
||||
3497DBEF1ECE2E4700DB2605 /* DomainFrontingCountryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3497DBEE1ECE2E4700DB2605 /* DomainFrontingCountryViewController.m */; };
|
||||
34B0796D1FCF46B100E248C2 /* MainAppContext.m in Sources */ = {isa = PBXBuildFile; fileRef = 34B0796B1FCF46B000E248C2 /* MainAppContext.m */; };
|
||||
34B3F8711E8DF1700035BE1A /* AboutTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34B3F8351E8DF1700035BE1A /* AboutTableViewController.m */; };
|
||||
34B3F8721E8DF1700035BE1A /* AdvancedSettingsTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34B3F8371E8DF1700035BE1A /* AdvancedSettingsTableViewController.m */; };
|
||||
34B3F8741E8DF1700035BE1A /* AttachmentSharing.m in Sources */ = {isa = PBXBuildFile; fileRef = 34B3F83A1E8DF1700035BE1A /* AttachmentSharing.m */; };
|
||||
|
@ -506,6 +507,8 @@
|
|||
3497DBEB1ECE257500DB2605 /* OWSCountryMetadata.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OWSCountryMetadata.m; sourceTree = "<group>"; };
|
||||
3497DBED1ECE2E4700DB2605 /* DomainFrontingCountryViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DomainFrontingCountryViewController.h; sourceTree = "<group>"; };
|
||||
3497DBEE1ECE2E4700DB2605 /* DomainFrontingCountryViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DomainFrontingCountryViewController.m; sourceTree = "<group>"; };
|
||||
34B0796B1FCF46B000E248C2 /* MainAppContext.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainAppContext.m; sourceTree = "<group>"; };
|
||||
34B0796C1FCF46B000E248C2 /* MainAppContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainAppContext.h; sourceTree = "<group>"; };
|
||||
34B3F8341E8DF1700035BE1A /* AboutTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AboutTableViewController.h; sourceTree = "<group>"; };
|
||||
34B3F8351E8DF1700035BE1A /* AboutTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AboutTableViewController.m; sourceTree = "<group>"; };
|
||||
34B3F8361E8DF1700035BE1A /* AdvancedSettingsTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdvancedSettingsTableViewController.h; sourceTree = "<group>"; };
|
||||
|
@ -1578,6 +1581,8 @@
|
|||
76EB04EA18170B33006006FC /* FunctionalUtil.h */,
|
||||
76EB04EB18170B33006006FC /* FunctionalUtil.m */,
|
||||
455AC69A1F4F79E500134004 /* ImageCache.swift */,
|
||||
34B0796C1FCF46B000E248C2 /* MainAppContext.h */,
|
||||
34B0796B1FCF46B000E248C2 /* MainAppContext.m */,
|
||||
34CA1C231F706B5400E51C51 /* NSAttributedString+OWS.h */,
|
||||
34CA1C241F706B5400E51C51 /* NSAttributedString+OWS.m */,
|
||||
76EB04EC18170B33006006FC /* NumberUtil.h */,
|
||||
|
@ -1597,6 +1602,7 @@
|
|||
4579431D1E7C8CE9008ED0C0 /* Pastelog.m */,
|
||||
450DF2041E0D74AC003D14BE /* Platform.swift */,
|
||||
4542F0951EBB9E9A00C7EE92 /* Promise+retainUntilComplete.swift */,
|
||||
45360B8C1F9521F800FA666C /* Searcher.swift */,
|
||||
76EB04F518170B33006006FC /* StringUtil.h */,
|
||||
76EB04F618170B33006006FC /* StringUtil.m */,
|
||||
4521C3BF1F59F3BA00B4C582 /* TextFieldHelper.swift */,
|
||||
|
@ -1610,7 +1616,6 @@
|
|||
76EB04FB18170B33006006FC /* Util.h */,
|
||||
45F170D51E315310003FC1F2 /* Weak.swift */,
|
||||
45F170CB1E310E22003FC1F2 /* WeakTimer.swift */,
|
||||
45360B8C1F9521F800FA666C /* Searcher.swift */,
|
||||
);
|
||||
path = util;
|
||||
sourceTree = "<group>";
|
||||
|
@ -2575,6 +2580,7 @@
|
|||
34F308A21ECB469700BB7697 /* OWSBezierPathView.m in Sources */,
|
||||
34CE88E71F2FB9A10098030F /* ProfileViewController.m in Sources */,
|
||||
348F2EAE1F0D21BC00D4ECE0 /* DeviceSleepManager.swift in Sources */,
|
||||
34B0796D1FCF46B100E248C2 /* MainAppContext.m in Sources */,
|
||||
34E3EF101EFC2684007F6822 /* DebugUIPage.m in Sources */,
|
||||
34D1F0AE1F867BFC0066283D /* OWSMessageCell.m in Sources */,
|
||||
451686AB1F520CDA00AC3D4B /* MultiDeviceProfileKeyUpdateJob.swift in Sources */,
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#import "CodeVerificationViewController.h"
|
||||
#import "DebugLogger.h"
|
||||
#import "Environment.h"
|
||||
#import "MainAppContext.h"
|
||||
#import "NotificationsManager.h"
|
||||
#import "OWSContactsManager.h"
|
||||
#import "OWSContactsSyncing.h"
|
||||
|
@ -25,7 +26,6 @@
|
|||
#import "ViewControllerUtils.h"
|
||||
#import <AxolotlKit/SessionCipher.h>
|
||||
#import <SignalMessaging/SignalMessaging.h>
|
||||
#import <SignalServiceKit/AppContext.h>
|
||||
#import <SignalServiceKit/NSUserDefaults+OWS.h>
|
||||
#import <SignalServiceKit/OWSBatchMessageProcessor.h>
|
||||
#import <SignalServiceKit/OWSDisappearingMessagesJob.h>
|
||||
|
@ -51,7 +51,7 @@ static NSString *const kInitialViewControllerIdentifier = @"UserInitialViewContr
|
|||
static NSString *const kURLSchemeSGNLKey = @"sgnl";
|
||||
static NSString *const kURLHostVerifyPrefix = @"verify";
|
||||
|
||||
@interface AppDelegate () <AppContext>
|
||||
@interface AppDelegate ()
|
||||
|
||||
@property (nonatomic) UIWindow *screenProtectionWindow;
|
||||
@property (nonatomic) OWSContactsSyncing *contactsSyncing;
|
||||
|
@ -92,7 +92,7 @@ static NSString *const kURLHostVerifyPrefix = @"verify";
|
|||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||
|
||||
// This should be the first thing we do.
|
||||
SetCurrentAppContext(self);
|
||||
SetCurrentAppContext([MainAppContext new]);
|
||||
|
||||
BOOL loggingIsEnabled;
|
||||
#ifdef DEBUG
|
||||
|
@ -973,22 +973,4 @@ static NSString *const kURLHostVerifyPrefix = @"verify";
|
|||
[AppUpdateNag.sharedInstance showAppUpgradeNagIfNecessary];
|
||||
}
|
||||
|
||||
#pragma mark - AppContext
|
||||
|
||||
- (BOOL)isMainApp
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)isMainAppAndActive
|
||||
{
|
||||
return [UIApplication sharedApplication].applicationState == UIApplicationStateActive;
|
||||
}
|
||||
|
||||
- (UIBackgroundTaskIdentifier)beginBackgroundTaskWithExpirationHandler:
|
||||
(BackgroundTaskExpirationHandler)expirationHandler
|
||||
{
|
||||
return [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:expirationHandler];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
//
|
||||
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
#import <SignalServiceKit/AppContext.h>
|
||||
|
||||
@interface MainAppContext : NSObject <AppContext>
|
||||
|
||||
@end
|
|
@ -0,0 +1,25 @@
|
|||
//
|
||||
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MainAppContext.h"
|
||||
|
||||
@implementation MainAppContext
|
||||
|
||||
- (BOOL)isMainApp
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)isMainAppAndActive
|
||||
{
|
||||
return [UIApplication sharedApplication].applicationState == UIApplicationStateActive;
|
||||
}
|
||||
|
||||
- (UIBackgroundTaskIdentifier)beginBackgroundTaskWithExpirationHandler:
|
||||
(BackgroundTaskExpirationHandler)expirationHandler
|
||||
{
|
||||
return [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:expirationHandler];
|
||||
}
|
||||
|
||||
@end
|
Loading…
Reference in New Issue