|
@@ -338,6 +338,9 @@
|
|
|
//
|
|
|
- (void)initializeMain:(NSNotification *)notification
|
|
|
{
|
|
|
+ NSDictionary *dict = notification.userInfo;
|
|
|
+ BOOL pushNotification = [[dict valueForKey:@"PushNotification"] boolValue];
|
|
|
+
|
|
|
_directoryGroupBy = nil;
|
|
|
_directoryOrder = nil;
|
|
|
_dateReadDataSource = nil;
|
|
@@ -405,6 +408,10 @@
|
|
|
// Read this folder
|
|
|
[self readFileReloadFolder];
|
|
|
|
|
|
+ // unsubscribing -> subscribing
|
|
|
+ if (pushNotification)
|
|
|
+ [appDelegate unsubscribingNextcloudServerPushNotification:YES];
|
|
|
+
|
|
|
} else {
|
|
|
|
|
|
// reload datasource
|
|
@@ -1021,7 +1028,8 @@
|
|
|
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.2 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
|
|
|
|
|
|
// go to home sweet home
|
|
|
- [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"initializeMain" object:nil];
|
|
|
+ NSDictionary* userInfo = @{@"PushNotification": [NSNumber numberWithBool:YES]};
|
|
|
+ [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"initializeMain" object:nil userInfo:userInfo];
|
|
|
|
|
|
[_ImageTitleHomeCryptoCloud setUserInteractionEnabled:YES];
|
|
|
});
|
|
@@ -2639,7 +2647,8 @@
|
|
|
[appDelegate settingActiveAccount:tableAccount.account activeUrl:tableAccount.url activeUser:tableAccount.user activeUserID:tableAccount.userID activePassword:tableAccount.password];
|
|
|
|
|
|
// go to home sweet home
|
|
|
- [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"initializeMain" object:nil];
|
|
|
+ NSDictionary* userInfo = @{@"PushNotification": [NSNumber numberWithBool:YES]};
|
|
|
+ [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"initializeMain" object:nil userInfo:userInfo];
|
|
|
}
|
|
|
});
|
|
|
}
|