Skip to content

Commit 795b837

Browse files
committed
T14564276 AP-973 Create account
(cherry picked from commit 28b3e2e)
1 parent cd9e2bb commit 795b837

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

iMEGA/AppDelegate/AppDelegate+Additions.swift

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -589,20 +589,17 @@ extension AppDelegate {
589589
ChatUploader.sharedInstance.setup()
590590
}
591591

592-
// MARK: - Misc flags
593-
func getMiscFlags() async throws {
594-
let accountUseCase = AccountUseCase(repository: AccountRepository.newRepo)
595-
try await accountUseCase.getMiscFlags()
596-
}
597-
598592
// MARK: - Shared links
599-
@objc func showLinkForNoLoggedInUser(_ url: URL) {
593+
@objc func showSharedLinkForNoLoggedInUser(_ url: URL) {
600594
Task {
595+
// Try to get miscellanous flags before showing the shared link
601596
do {
602-
try await getMiscFlags()
597+
let accountUseCase = AccountUseCase(repository: AccountRepository.newRepo)
598+
try await accountUseCase.getMiscFlags()
603599
showLink(url)
604600
} catch {
605601
MEGALogError("[Misc Flag]Error getting miscellanous flags.")
602+
showLink(url)
606603
}
607604
}
608605
}

iMEGA/AppDelegate/AppDelegate.m

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,14 @@ - (void)manageLink:(NSURL *)url {
573573
}
574574
}
575575
} else {
576-
[self showLinkForNoLoggedInUser:url];
576+
switch ([url mnz_type]) {
577+
case URLTypeFileLink:
578+
case URLTypeFolderLink:
579+
[self showSharedLinkForNoLoggedInUser:url];
580+
581+
default:
582+
[self showLink:url];
583+
}
577584
}
578585
}
579586

0 commit comments

Comments
 (0)