|
@@ -141,7 +141,9 @@
|
|
|
if (self.account.length == 0) {
|
|
|
[self openLoginView:nil selector:k_intro_login openLoginWeb:false];
|
|
|
}
|
|
|
+
|
|
|
} else {
|
|
|
+
|
|
|
if ([CCUtility getIntro] == NO) {
|
|
|
UIViewController *introViewController = [[UIStoryboard storyboardWithName:@"NCIntro" bundle:[NSBundle mainBundle]] instantiateInitialViewController];
|
|
|
|
|
@@ -170,7 +172,7 @@
|
|
|
//
|
|
|
- (void)applicationWillResignActive:(UIApplication *)application
|
|
|
{
|
|
|
- if (self.account.length == 0) return;
|
|
|
+ if (self.account.length == 0) { return; }
|
|
|
|
|
|
// Dismiss FileViewInFolder
|
|
|
if (self.activeFileViewInFolder != nil ) {
|
|
@@ -257,7 +259,7 @@
|
|
|
// NotificationCenter
|
|
|
- (void)initializeMain:(NSNotification *)notification
|
|
|
{
|
|
|
- if (self.account.length == 0) return;
|
|
|
+ if (self.account.length == 0) { return; }
|
|
|
|
|
|
// Clear error certificate
|
|
|
[CCUtility setCertificateError:self.account error:NO];
|
|
@@ -297,8 +299,7 @@
|
|
|
|
|
|
- (void)checkErrorNetworking
|
|
|
{
|
|
|
- // test
|
|
|
- if (self.account.length == 0) return;
|
|
|
+ if (self.account.length == 0) { return; }
|
|
|
|
|
|
// check unauthorized server (401)
|
|
|
if ([CCUtility getPassword:self.account].length == 0) {
|
|
@@ -502,8 +503,7 @@
|
|
|
|
|
|
- (void)pushNotification
|
|
|
{
|
|
|
- // test
|
|
|
- if (self.account.length == 0 || self.pushKitToken.length == 0) return;
|
|
|
+ if (self.account.length == 0 || self.pushKitToken.length == 0) { return; }
|
|
|
|
|
|
for (tableAccount *result in [[NCManageDatabase sharedInstance] getAllAccount]) {
|
|
|
|
|
@@ -522,8 +522,7 @@
|
|
|
|
|
|
- (void)subscribingNextcloudServerPushNotification:(NSString *)account urlBase:(NSString *)urlBase user:(NSString *)user
|
|
|
{
|
|
|
- // test
|
|
|
- if (self.account.length == 0 || self.pushKitToken.length == 0) return;
|
|
|
+ if (self.account.length == 0 || self.pushKitToken.length == 0) { return; }
|
|
|
|
|
|
[[NCPushNotificationEncryption sharedInstance] generatePushNotificationsKeyPair:account];
|
|
|
|
|
@@ -552,7 +551,7 @@
|
|
|
|
|
|
- (void)unsubscribingNextcloudServerPushNotification:(NSString *)account urlBase:(NSString *)urlBase user:(NSString *)user withSubscribing:(BOOL)subscribing
|
|
|
{
|
|
|
- if (self.account.length == 0) return;
|
|
|
+ if (self.account.length == 0) { return; }
|
|
|
|
|
|
NSString *deviceIdentifier = [CCUtility getPushNotificationDeviceIdentifier:account];
|
|
|
NSString *signature = [CCUtility getPushNotificationDeviceIdentifierSignature:account];
|
|
@@ -685,7 +684,7 @@
|
|
|
|
|
|
- (void)updateApplicationIconBadgeNumber
|
|
|
{
|
|
|
- if (self.account.length == 0) return;
|
|
|
+ if (self.account.length == 0) { return; }
|
|
|
|
|
|
NSInteger counterDownload = [[NCOperationQueue shared] downloadCount];
|
|
|
NSInteger counterUpload = [[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"status == %d OR status == %d OR status == %d", k_metadataStatusWaitUpload, k_metadataStatusInUpload, k_metadataStatusUploading]].count;
|
|
@@ -755,7 +754,7 @@
|
|
|
// Method called from iOS system to send a file from other app.
|
|
|
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options
|
|
|
{
|
|
|
- if (self.account.length == 0) return YES;
|
|
|
+ if (self.account.length == 0) { return YES; }
|
|
|
|
|
|
NSString *scheme = url.scheme;
|
|
|
NSString *fileName;
|