From a960331de112b9773683253fb37884404e97bb73 Mon Sep 17 00:00:00 2001 From: Anton Kharchevskyi Date: Tue, 22 Jun 2021 21:59:32 +0300 Subject: [PATCH 01/35] Added comments to setup flow controllers --- .../Controllers/Setup/SetupBackupsViewController.swift | 8 ++++++++ .../Setup/SetupGenerateKeyViewController.swift | 7 +++++++ .../Controllers/Setup/SetupInitialViewController.swift | 8 ++++++++ .../SetupManuallyEnterPassPhraseViewController.swift | 5 +++++ .../Setup/SetupManuallyImportKeyViewController.swift | 7 +++++++ 5 files changed, 35 insertions(+) diff --git a/FlowCrypt/Controllers/Setup/SetupBackupsViewController.swift b/FlowCrypt/Controllers/Setup/SetupBackupsViewController.swift index 9c6772f94..b3f848956 100644 --- a/FlowCrypt/Controllers/Setup/SetupBackupsViewController.swift +++ b/FlowCrypt/Controllers/Setup/SetupBackupsViewController.swift @@ -6,6 +6,14 @@ import AsyncDisplayKit import FlowCryptUI import Promises +/** + * Scene which is responsible for recovering user account with backups and entered pass phrase + * - User is sent here from **SetupInitialViewController** if there was key backups found + * - User will be prompted to enter his pass phrase + * - Pass phrase can be save in memory or in encrypted storage + * - In case pass phrase matches with backups User will be redirected to **main flow** + */ + final class SetupBackupsViewController: TableNodeViewController, PassPhraseSaveable { private enum Parts: Int, CaseIterable { case title, description, passPhrase, divider, saveLocally, saveInMemory, action, optionalAction diff --git a/FlowCrypt/Controllers/Setup/SetupGenerateKeyViewController.swift b/FlowCrypt/Controllers/Setup/SetupGenerateKeyViewController.swift index ce6fc10ec..fc2aa7c8d 100644 --- a/FlowCrypt/Controllers/Setup/SetupGenerateKeyViewController.swift +++ b/FlowCrypt/Controllers/Setup/SetupGenerateKeyViewController.swift @@ -22,6 +22,13 @@ enum CreateKeyError: Error { case conformingPassPhraseError } +/** + * Controller which is responsible for generating key + * - User is sent here from **SetupInitialViewController** in case there are no backups found + * - Here user can enter a pass phrase (can be saved in memory or in storage) and generate a key + * - After key is generated, user will be redirected to **main flow** + */ + final class SetupGenerateKeyViewController: TableNodeViewController, PassPhraseSaveable { enum Parts: Int, CaseIterable { case title, description, passPhrase, divider, saveLocally, saveInMemory, action, subtitle diff --git a/FlowCrypt/Controllers/Setup/SetupInitialViewController.swift b/FlowCrypt/Controllers/Setup/SetupInitialViewController.swift index ceea78488..26dfbddd9 100644 --- a/FlowCrypt/Controllers/Setup/SetupInitialViewController.swift +++ b/FlowCrypt/Controllers/Setup/SetupInitialViewController.swift @@ -9,6 +9,14 @@ import AsyncDisplayKit import FlowCryptUI +/** + * Initial controller for setup flow which is responsible for searching backups. + * - In case backup keys are found user will be redirected to **SetupBackupsViewController** + * - In case there are no backups, user will have two options: + * - Import keys - **SetupManuallyImportKeyViewController** + * - Create new keys - **SetupGenerateKeyViewController** + */ + final class SetupInitialViewController: TableNodeViewController { private enum Parts: Int, CaseIterable { case title, description, createKey, importKey, anotherAccount diff --git a/FlowCrypt/Controllers/Setup/SetupManuallyEnterPassPhraseViewController.swift b/FlowCrypt/Controllers/Setup/SetupManuallyEnterPassPhraseViewController.swift index 9f77d5553..6cbc244a5 100644 --- a/FlowCrypt/Controllers/Setup/SetupManuallyEnterPassPhraseViewController.swift +++ b/FlowCrypt/Controllers/Setup/SetupManuallyEnterPassPhraseViewController.swift @@ -9,6 +9,11 @@ import AsyncDisplayKit import FlowCryptUI +/** + * Controller which is responsible for entering pass phrase after key/keys was imported or pasted + * User will be sent here from **SetupManuallyImportKeyViewController** from setup flow or from settings + */ + final class SetupManuallyEnterPassPhraseViewController: TableNodeViewController, PassPhraseSaveable { private enum Parts: Int, CaseIterable { case title, description, passPhrase, divider, saveLocally, saveInMemory, enterPhrase, chooseAnother diff --git a/FlowCrypt/Controllers/Setup/SetupManuallyImportKeyViewController.swift b/FlowCrypt/Controllers/Setup/SetupManuallyImportKeyViewController.swift index 7765d1100..bc558d815 100644 --- a/FlowCrypt/Controllers/Setup/SetupManuallyImportKeyViewController.swift +++ b/FlowCrypt/Controllers/Setup/SetupManuallyImportKeyViewController.swift @@ -10,6 +10,13 @@ import AsyncDisplayKit import FlowCryptUI import MobileCoreServices +/** + * Controller which is responsible for importing key from a file or to paste it from pasteBoard + * - User can reach this screen in case there are no backups found from **SetupInitialViewController** in setup flow + * - Or from key settings **KeySettingsViewController** + * - After key is added user will be redirected to **SetupManuallyEnterPassPhraseViewController** + */ + final class SetupManuallyImportKeyViewController: TableNodeViewController { private enum Parts: Int, CaseIterable { case title, description, fileImport, pasteBoardImport From 224ed7e7fc81d925ba1072456ee9e528e7ec5fbd Mon Sep 17 00:00:00 2001 From: Tom J <6306961+tomholub@users.noreply.github.com> Date: Tue, 22 Jun 2021 20:00:13 +0000 Subject: [PATCH 02/35] Update SetupBackupsViewController.swift --- .../Controllers/Setup/SetupBackupsViewController.swift | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/FlowCrypt/Controllers/Setup/SetupBackupsViewController.swift b/FlowCrypt/Controllers/Setup/SetupBackupsViewController.swift index b3f848956..6c55c6d69 100644 --- a/FlowCrypt/Controllers/Setup/SetupBackupsViewController.swift +++ b/FlowCrypt/Controllers/Setup/SetupBackupsViewController.swift @@ -7,11 +7,12 @@ import FlowCryptUI import Promises /** - * Scene which is responsible for recovering user account with backups and entered pass phrase - * - User is sent here from **SetupInitialViewController** if there was key backups found + * Scene which is responsible for recovering user account with backups from inbox and entered pass phrase + * (typically used for end-users, enterprises tend to either import manually or with EKM) + * - User is sent here from **SetupInitialViewController** if there was key backups found in inbox * - User will be prompted to enter his pass phrase - * - Pass phrase can be save in memory or in encrypted storage - * - In case pass phrase matches with backups User will be redirected to **main flow** + * - Pass phrase can be saved in memory for 4 hours or in encrypted local storage + * - In case entered pass phrase matches with backups, user will be redirected to **main flow** (inbox view) */ final class SetupBackupsViewController: TableNodeViewController, PassPhraseSaveable { From 5e86c1ed3c24ef7cf0f8a1fc1adb0207350ae44d Mon Sep 17 00:00:00 2001 From: Tom J <6306961+tomholub@users.noreply.github.com> Date: Tue, 22 Jun 2021 20:00:53 +0000 Subject: [PATCH 03/35] Update SetupGenerateKeyViewController.swift --- .../Controllers/Setup/SetupGenerateKeyViewController.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/FlowCrypt/Controllers/Setup/SetupGenerateKeyViewController.swift b/FlowCrypt/Controllers/Setup/SetupGenerateKeyViewController.swift index fc2aa7c8d..e814027e8 100644 --- a/FlowCrypt/Controllers/Setup/SetupGenerateKeyViewController.swift +++ b/FlowCrypt/Controllers/Setup/SetupGenerateKeyViewController.swift @@ -23,10 +23,10 @@ enum CreateKeyError: Error { } /** - * Controller which is responsible for generating key + * Controller which is responsible for generating a new key during setup * - User is sent here from **SetupInitialViewController** in case there are no backups found - * - Here user can enter a pass phrase (can be saved in memory or in storage) and generate a key - * - After key is generated, user will be redirected to **main flow** + * - Here user can enter a pass phrase (can be saved in memory or in encrypted storage) and generate a key + * - After key is generated, user will be redirected to **main flow** (inbox view) */ final class SetupGenerateKeyViewController: TableNodeViewController, PassPhraseSaveable { From 7fc7fa458e87adb190e4ee86a1d90f4b8902f59b Mon Sep 17 00:00:00 2001 From: Tom J <6306961+tomholub@users.noreply.github.com> Date: Tue, 22 Jun 2021 20:02:08 +0000 Subject: [PATCH 04/35] Update SetupInitialViewController.swift --- .../Setup/SetupInitialViewController.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/FlowCrypt/Controllers/Setup/SetupInitialViewController.swift b/FlowCrypt/Controllers/Setup/SetupInitialViewController.swift index 26dfbddd9..79794949b 100644 --- a/FlowCrypt/Controllers/Setup/SetupInitialViewController.swift +++ b/FlowCrypt/Controllers/Setup/SetupInitialViewController.swift @@ -10,13 +10,13 @@ import AsyncDisplayKit import FlowCryptUI /** - * Initial controller for setup flow which is responsible for searching backups. - * - In case backup keys are found user will be redirected to **SetupBackupsViewController** - * - In case there are no backups, user will have two options: - * - Import keys - **SetupManuallyImportKeyViewController** - * - Create new keys - **SetupGenerateKeyViewController** + * Initial controller for setup flow which is responsible for searching backups and + * then redirecting user to appropriate setup flow. + * - In case backup keys are found, user will be redirected to **SetupBackupsViewController** + * - In case there are no backups, user will have two options presented in this view: + * - Import key - **SetupManuallyImportKeyViewController** + * - Create new key - **SetupGenerateKeyViewController** */ - final class SetupInitialViewController: TableNodeViewController { private enum Parts: Int, CaseIterable { case title, description, createKey, importKey, anotherAccount From db33b40c5ab7b53fd8f0cb68c82b84d6301be66a Mon Sep 17 00:00:00 2001 From: Tom J <6306961+tomholub@users.noreply.github.com> Date: Tue, 22 Jun 2021 20:03:20 +0000 Subject: [PATCH 05/35] Update SetupManuallyEnterPassPhraseViewController.swift --- .../Setup/SetupManuallyEnterPassPhraseViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FlowCrypt/Controllers/Setup/SetupManuallyEnterPassPhraseViewController.swift b/FlowCrypt/Controllers/Setup/SetupManuallyEnterPassPhraseViewController.swift index 6cbc244a5..3dd84f781 100644 --- a/FlowCrypt/Controllers/Setup/SetupManuallyEnterPassPhraseViewController.swift +++ b/FlowCrypt/Controllers/Setup/SetupManuallyEnterPassPhraseViewController.swift @@ -12,8 +12,8 @@ import FlowCryptUI /** * Controller which is responsible for entering pass phrase after key/keys was imported or pasted * User will be sent here from **SetupManuallyImportKeyViewController** from setup flow or from settings + * After user enters pass phrase sccessfully, account will be set up and they will be sent to main flow (inbox view) */ - final class SetupManuallyEnterPassPhraseViewController: TableNodeViewController, PassPhraseSaveable { private enum Parts: Int, CaseIterable { case title, description, passPhrase, divider, saveLocally, saveInMemory, enterPhrase, chooseAnother From b8bb32b0577b7a4ab2b4c66a698483798a8a356b Mon Sep 17 00:00:00 2001 From: Tom J <6306961+tomholub@users.noreply.github.com> Date: Tue, 22 Jun 2021 20:04:36 +0000 Subject: [PATCH 06/35] Update SetupManuallyImportKeyViewController.swift --- .../Setup/SetupManuallyImportKeyViewController.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/FlowCrypt/Controllers/Setup/SetupManuallyImportKeyViewController.swift b/FlowCrypt/Controllers/Setup/SetupManuallyImportKeyViewController.swift index bc558d815..2a9c26593 100644 --- a/FlowCrypt/Controllers/Setup/SetupManuallyImportKeyViewController.swift +++ b/FlowCrypt/Controllers/Setup/SetupManuallyImportKeyViewController.swift @@ -12,11 +12,11 @@ import MobileCoreServices /** * Controller which is responsible for importing key from a file or to paste it from pasteBoard - * - User can reach this screen in case there are no backups found from **SetupInitialViewController** in setup flow - * - Or from key settings **KeySettingsViewController** + * - User can reach this screen: + * - when there are no backups found from **SetupInitialViewController** in setup flow + * - or from key settings **KeySettingsViewController** * - After key is added user will be redirected to **SetupManuallyEnterPassPhraseViewController** */ - final class SetupManuallyImportKeyViewController: TableNodeViewController { private enum Parts: Int, CaseIterable { case title, description, fileImport, pasteBoardImport From 3f73d4789a0249da22db43fed9274b536eedb984 Mon Sep 17 00:00:00 2001 From: Anton Kharchevskyi Date: Thu, 24 Jun 2021 22:20:24 +0300 Subject: [PATCH 07/35] Update MyMenuViewController --- .../Controllers/Setup/SetupInitialViewController.swift | 4 ++-- .../Controllers/SideMenu/Menu/MyMenuViewController.swift | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/FlowCrypt/Controllers/Setup/SetupInitialViewController.swift b/FlowCrypt/Controllers/Setup/SetupInitialViewController.swift index 79794949b..fac5b7e4a 100644 --- a/FlowCrypt/Controllers/Setup/SetupInitialViewController.swift +++ b/FlowCrypt/Controllers/Setup/SetupInitialViewController.swift @@ -10,8 +10,8 @@ import AsyncDisplayKit import FlowCryptUI /** - * Initial controller for setup flow which is responsible for searching backups and - * then redirecting user to appropriate setup flow. + * Initial controller for setup flow which is responsible for searching backups and + * then redirecting user to appropriate setup flow. * - In case backup keys are found, user will be redirected to **SetupBackupsViewController** * - In case there are no backups, user will have two options presented in this view: * - Import key - **SetupManuallyImportKeyViewController** diff --git a/FlowCrypt/Controllers/SideMenu/Menu/MyMenuViewController.swift b/FlowCrypt/Controllers/SideMenu/Menu/MyMenuViewController.swift index 94230ced4..fc988a703 100644 --- a/FlowCrypt/Controllers/SideMenu/Menu/MyMenuViewController.swift +++ b/FlowCrypt/Controllers/SideMenu/Menu/MyMenuViewController.swift @@ -6,6 +6,14 @@ import AsyncDisplayKit import FlowCryptUI import Promises +/** + * Menu view controller + * Represents User folders and menu buttons like log out and settings + * User see this screen when taps the burger menu + * On tap on each folder user should be redirected to `InboxViewController` with selected folder + * On settings tap user will be redirected to `SettingsViewController` + */ + final class MyMenuViewController: ASDKViewController { private enum Constants { static let allMail = "folder_all_mail".localized From 2c588909c37942bcfd093d21a2750c0b0c371a21 Mon Sep 17 00:00:00 2001 From: Anton Kharchevskyi Date: Thu, 24 Jun 2021 22:24:50 +0300 Subject: [PATCH 08/35] Update SideMenuNavigationController --- .../SideMenu/Main/SideMenuNavigationController.swift | 6 ++++++ .../Controllers/SideMenu/Menu/MyMenuViewController.swift | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/FlowCrypt/Controllers/SideMenu/Main/SideMenuNavigationController.swift b/FlowCrypt/Controllers/SideMenu/Main/SideMenuNavigationController.swift index 581efe7b2..6f0abf626 100644 --- a/FlowCrypt/Controllers/SideMenu/Main/SideMenuNavigationController.swift +++ b/FlowCrypt/Controllers/SideMenu/Main/SideMenuNavigationController.swift @@ -14,6 +14,12 @@ protocol SideMenuViewController { func didOpen() } +/** + * Navigation Controller inherited from ENSideMenuNavigationController + * - Encapsulates logic of status bar appearance, burger menu width, offsets and etc + * - Responsible for disabling gestures on side controllers when menu is shown + * - Adds menu button or back button as part of navigation item, based on pushed controller + */ final class SideMenuNavigationController: ENSideMenuNavigationController { private var isStatusBarHidden = false { didSet { diff --git a/FlowCrypt/Controllers/SideMenu/Menu/MyMenuViewController.swift b/FlowCrypt/Controllers/SideMenu/Menu/MyMenuViewController.swift index fc988a703..92813605c 100644 --- a/FlowCrypt/Controllers/SideMenu/Menu/MyMenuViewController.swift +++ b/FlowCrypt/Controllers/SideMenu/Menu/MyMenuViewController.swift @@ -13,7 +13,6 @@ import Promises * On tap on each folder user should be redirected to `InboxViewController` with selected folder * On settings tap user will be redirected to `SettingsViewController` */ - final class MyMenuViewController: ASDKViewController { private enum Constants { static let allMail = "folder_all_mail".localized From a4c258de2eac297427030640ae467a834a0b4a4e Mon Sep 17 00:00:00 2001 From: Anton Kharchevskyi Date: Thu, 24 Jun 2021 22:26:25 +0300 Subject: [PATCH 09/35] Update MainNavigationController --- .../NavigationController/MainNavigationController.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/FlowCrypt/Controllers/SideMenu/NavigationController/MainNavigationController.swift b/FlowCrypt/Controllers/SideMenu/NavigationController/MainNavigationController.swift index 4f5d470a1..4ae2ba9ee 100644 --- a/FlowCrypt/Controllers/SideMenu/NavigationController/MainNavigationController.swift +++ b/FlowCrypt/Controllers/SideMenu/NavigationController/MainNavigationController.swift @@ -17,6 +17,9 @@ final class MainNavigationController: ASNavigationController { } } +/** + * Default styled UINavigationController for the app + */ extension MainNavigationController: UINavigationControllerDelegate { func navigationController(_: UINavigationController, willShow viewController: UIViewController, animated _: Bool) { viewController.navigationItem.hidesBackButton = true From 99fcb12a598082dedae3ca0be5e79c751cbab33d Mon Sep 17 00:00:00 2001 From: Anton Kharchevskyi Date: Thu, 24 Jun 2021 22:30:41 +0300 Subject: [PATCH 10/35] Update EmailProviderViewController --- .../SignIn Other/EmailProviderViewController.swift | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/FlowCrypt/Controllers/SignIn Other/EmailProviderViewController.swift b/FlowCrypt/Controllers/SignIn Other/EmailProviderViewController.swift index 657a4d3ee..487abfbfe 100644 --- a/FlowCrypt/Controllers/SignIn Other/EmailProviderViewController.swift +++ b/FlowCrypt/Controllers/SignIn Other/EmailProviderViewController.swift @@ -10,6 +10,11 @@ import AsyncDisplayKit import FlowCryptUI import Promises +/** + * Controller that gives a possibility for the user to enter information about his email provider like, account, imap/smtp information + * - User redirects here from SignInViewController + * - After successful connection user will be redirected to *main flow* + */ final class EmailProviderViewController: TableNodeViewController { private enum UserError: Error { case password @@ -261,10 +266,11 @@ extension EmailProviderViewController { } private func buttonNode() -> ButtonCellNode { - ButtonCellNode( + let input = ButtonCellNode.Input( title: decorator.connectButtonTitle, insets: decorator.connectButtonInsets - ) { [weak self] in + ) + return ButtonCellNode(input: input) { [weak self] in self?.connect() } } From 44272e4b0f4288b9cf83cfe68209f33c9a8d3eff Mon Sep 17 00:00:00 2001 From: Anton Kharchevskyi Date: Thu, 24 Jun 2021 22:33:41 +0300 Subject: [PATCH 11/35] Update SignInViewController --- FlowCrypt/Controllers/SignIn/SignInViewController.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/FlowCrypt/Controllers/SignIn/SignInViewController.swift b/FlowCrypt/Controllers/SignIn/SignInViewController.swift index 79ae91558..c0a367fb2 100644 --- a/FlowCrypt/Controllers/SignIn/SignInViewController.swift +++ b/FlowCrypt/Controllers/SignIn/SignInViewController.swift @@ -6,6 +6,14 @@ import AsyncDisplayKit import FlowCryptCommon import FlowCryptUI +/** + * Sign in controller + * - User can sign in with: + * - Gmail + * - Outlook (not implemented yet) + * - Other email provider (*EmailProviderViewController*) + * - User can also check privacy, terms and security links via *WebViewController* + */ final class SignInViewController: TableNodeViewController { enum AppLinks: String, CaseIterable { From 5a23c5e6234e8da7c736673422337ad55f1f8f77 Mon Sep 17 00:00:00 2001 From: Anton Kharchevskyi Date: Thu, 24 Jun 2021 22:34:36 +0300 Subject: [PATCH 12/35] Update WebViewController --- FlowCrypt/Common UI/View Controllers/WebViewController.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/FlowCrypt/Common UI/View Controllers/WebViewController.swift b/FlowCrypt/Common UI/View Controllers/WebViewController.swift index c33fc7891..7c7a1799f 100644 --- a/FlowCrypt/Common UI/View Controllers/WebViewController.swift +++ b/FlowCrypt/Common UI/View Controllers/WebViewController.swift @@ -9,6 +9,9 @@ import UIKit import WebKit +/** + * InApp WebViewController to show web content + */ final class WebViewController: UIViewController { private lazy var webView = WKWebView() From 719972ef4656d772d20878b56c44e02e31f3cb1c Mon Sep 17 00:00:00 2001 From: Anton Kharchevskyi Date: Thu, 24 Jun 2021 22:37:18 +0300 Subject: [PATCH 13/35] Update BootstrapViewController --- .../Controllers/Bootstrap/BootstrapViewController.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/FlowCrypt/Controllers/Bootstrap/BootstrapViewController.swift b/FlowCrypt/Controllers/Bootstrap/BootstrapViewController.swift index 8016f4214..00f3b82e0 100644 --- a/FlowCrypt/Controllers/Bootstrap/BootstrapViewController.swift +++ b/FlowCrypt/Controllers/Bootstrap/BootstrapViewController.swift @@ -8,14 +8,14 @@ import UIKit +/** + * View controller with activity indicator which is presented before all AppStartup activity finished (setup Core, migration of the DB...) + */ final class BootstrapViewController: UIViewController { - let imap = Imap.shared - var completion: ((Error?) -> Void)? - override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .backgroundColor - let activityIndicator = UIActivityIndicatorView(style: .gray) + let activityIndicator = UIActivityIndicatorView(style: .medium) activityIndicator.startAnimating() view.addSubview(activityIndicator) activityIndicator.center = view.center From dc4753811747756b3be5c76d28c76263b67fe438 Mon Sep 17 00:00:00 2001 From: Anton Kharchevskyi Date: Thu, 24 Jun 2021 22:41:06 +0300 Subject: [PATCH 14/35] Update InboxViewController --- FlowCrypt/Controllers/Inbox/InboxViewController.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/FlowCrypt/Controllers/Inbox/InboxViewController.swift b/FlowCrypt/Controllers/Inbox/InboxViewController.swift index bdc5a6703..e53db4266 100644 --- a/FlowCrypt/Controllers/Inbox/InboxViewController.swift +++ b/FlowCrypt/Controllers/Inbox/InboxViewController.swift @@ -7,6 +7,11 @@ import FlowCryptCommon import FlowCryptUI import Promises +/** + * View controller which shows message list of selected folder or inbox + * - Initial view controller of the *main flow* + * - User can be redirected here via selecting folder from menu *MyMenuViewController* + */ final class InboxViewController: ASDKViewController { private enum Constants { static let numberOfMessagesToLoad = 50 From b9478aea6b48a1e192d522366960cda8a5f5ae38 Mon Sep 17 00:00:00 2001 From: Anton Kharchevskyi Date: Thu, 24 Jun 2021 22:42:56 +0300 Subject: [PATCH 15/35] Update InboxViewControllerContainer --- .../Inbox/Container/InboxViewControllerContainer.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/FlowCrypt/Controllers/Inbox/Container/InboxViewControllerContainer.swift b/FlowCrypt/Controllers/Inbox/Container/InboxViewControllerContainer.swift index 1750f2492..6417bbfe6 100644 --- a/FlowCrypt/Controllers/Inbox/Container/InboxViewControllerContainer.swift +++ b/FlowCrypt/Controllers/Inbox/Container/InboxViewControllerContainer.swift @@ -10,8 +10,10 @@ import AsyncDisplayKit import FlowCryptCommon import FlowCryptUI -// MARK: - InboxViewControllerContainer -// Used to fetch folders and get correct path for "inbox" folder +/** + * View controller which serves as intermediate controller + * - Used to fetch folders and get correct path for "inbox" folder + */ final class InboxViewControllerContainer: TableNodeViewController { private let inbox = "inbox" From 40ace0c07c7a1b89d0b99e8e1385db07071c3683 Mon Sep 17 00:00:00 2001 From: Anton Kharchevskyi Date: Thu, 24 Jun 2021 22:44:47 +0300 Subject: [PATCH 16/35] Update ComposeViewController --- FlowCrypt/Controllers/Compose/ComposeViewController.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/FlowCrypt/Controllers/Compose/ComposeViewController.swift b/FlowCrypt/Controllers/Compose/ComposeViewController.swift index 7685dd38e..a71777160 100644 --- a/FlowCrypt/Controllers/Compose/ComposeViewController.swift +++ b/FlowCrypt/Controllers/Compose/ComposeViewController.swift @@ -7,6 +7,11 @@ import FlowCryptCommon import FlowCryptUI import Promises +/** + * View controller to compose the message and send it + * - User can be redirected here from *InboxViewController* by tapping on *+* + * - Or from *MessageViewController* controller by tapping on *reply* + */ final class ComposeViewController: TableNodeViewController { struct Recipient { let email: String From 18fa470fcbaba4d665e9e1f2c7884703313ecb57 Mon Sep 17 00:00:00 2001 From: Anton Kharchevskyi Date: Thu, 24 Jun 2021 22:47:09 +0300 Subject: [PATCH 17/35] Update MessageViewController --- FlowCrypt/Controllers/Msg/MessageViewController.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/FlowCrypt/Controllers/Msg/MessageViewController.swift b/FlowCrypt/Controllers/Msg/MessageViewController.swift index bdc18b863..05ac272d5 100644 --- a/FlowCrypt/Controllers/Msg/MessageViewController.swift +++ b/FlowCrypt/Controllers/Msg/MessageViewController.swift @@ -6,6 +6,9 @@ import AsyncDisplayKit import FlowCryptUI import Promises +/** + * View controller to show context of the message (sender, subject, message, attachments) + */ final class MessageViewController: TableNodeViewController { struct Input { var objMessage: Message From 6fd47842ce3b08fa11ff9730356173ba26cd776a Mon Sep 17 00:00:00 2001 From: Anton Kharchevskyi Date: Thu, 24 Jun 2021 22:48:12 +0300 Subject: [PATCH 18/35] Update SearchViewController --- FlowCrypt/Controllers/Search/SearchViewController.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/FlowCrypt/Controllers/Search/SearchViewController.swift b/FlowCrypt/Controllers/Search/SearchViewController.swift index c1d2d0dad..31ea6395a 100644 --- a/FlowCrypt/Controllers/Search/SearchViewController.swift +++ b/FlowCrypt/Controllers/Search/SearchViewController.swift @@ -10,6 +10,10 @@ import AsyncDisplayKit import FlowCryptCommon import FlowCryptUI +/** + * View controller to search messages in folders + * - User can be redirected here from *InboxViewController* by tapping on search icon + */ final class SearchViewController: TableNodeViewController { private enum Constants { // TODO: - Ticket - Add pagination for SearchViewController From 76250080300981022c99034440eb06d9cd61d1af Mon Sep 17 00:00:00 2001 From: Anton Kharchevskyi Date: Thu, 24 Jun 2021 22:52:20 +0300 Subject: [PATCH 19/35] Update ContactsListViewController --- .../Contacts/Contacts List/ContactsListViewController.swift | 4 ++++ .../Settings/Settings List/SettingsViewController.swift | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/FlowCrypt/Controllers/Settings/Contacts/Contacts List/ContactsListViewController.swift b/FlowCrypt/Controllers/Settings/Contacts/Contacts List/ContactsListViewController.swift index 9729a38aa..424931a8b 100644 --- a/FlowCrypt/Controllers/Settings/Contacts/Contacts List/ContactsListViewController.swift +++ b/FlowCrypt/Controllers/Settings/Contacts/Contacts List/ContactsListViewController.swift @@ -10,6 +10,10 @@ import AsyncDisplayKit import FlowCryptCommon import FlowCryptUI +/** + * View controller which shows saved user contacts list + * - User can be redirected here from settings *SettingsViewController* + */ final class ContactsListViewController: TableNodeViewController { private let decorator: ContactsListDecoratorType private let contactsProvider: LocalContactsProviderType diff --git a/FlowCrypt/Controllers/Settings/Settings List/SettingsViewController.swift b/FlowCrypt/Controllers/Settings/Settings List/SettingsViewController.swift index 8ef99d8e3..59d8ee368 100644 --- a/FlowCrypt/Controllers/Settings/Settings List/SettingsViewController.swift +++ b/FlowCrypt/Controllers/Settings/Settings List/SettingsViewController.swift @@ -9,6 +9,12 @@ import AsyncDisplayKit import FlowCryptUI +/** + * User settings view controller + * - Shows list of possible settings(backups, privacy, contacts, keys, atteseter, notifications, legal, experimental) + * - User can be redirected here from side menu + * - Tap on each row will navigate user to appropriate settings controller + */ final class SettingsViewController: TableNodeViewController { private enum Settings: Int, CaseIterable { case backups, privacy, contacts, keys, atteseter, notifications, legal, experimental From c1426c0381733a157ef7f3daea1465beac137d52 Mon Sep 17 00:00:00 2001 From: Anton Kharchevskyi Date: Thu, 24 Jun 2021 22:53:21 +0300 Subject: [PATCH 20/35] Update ContactDetailViewController --- .../Contacts/Contacts List/ContactDetailViewController.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/FlowCrypt/Controllers/Settings/Contacts/Contacts List/ContactDetailViewController.swift b/FlowCrypt/Controllers/Settings/Contacts/Contacts List/ContactDetailViewController.swift index d0e2233d9..13a136fa2 100644 --- a/FlowCrypt/Controllers/Settings/Contacts/Contacts List/ContactDetailViewController.swift +++ b/FlowCrypt/Controllers/Settings/Contacts/Contacts List/ContactDetailViewController.swift @@ -9,6 +9,10 @@ import AsyncDisplayKit import FlowCryptUI +/** + * View controller which shows contacts details(information about ids, fingerprints...) + * - User can be redirected here from settings *ContactsListViewController* + */ final class ContactDetailViewController: TableNodeViewController { typealias ContactDetailAction = (Action) -> Void From 6b42a9a1914d3e4cf66b9b378b09ccaa104d403a Mon Sep 17 00:00:00 2001 From: Anton Kharchevskyi Date: Thu, 24 Jun 2021 22:55:44 +0300 Subject: [PATCH 21/35] Update KeySettingsViewController --- FlowCrypt.xcodeproj/project.pbxproj | 2 +- .../KeySettings/Key List/KeySettingsViewController.swift | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/FlowCrypt.xcodeproj/project.pbxproj b/FlowCrypt.xcodeproj/project.pbxproj index 460ff4641..93fd8a213 100644 --- a/FlowCrypt.xcodeproj/project.pbxproj +++ b/FlowCrypt.xcodeproj/project.pbxproj @@ -904,9 +904,9 @@ 5A39F43B239ECFA0001F4607 /* KeySettings */ = { isa = PBXGroup; children = ( + 5ADEDCB423A4262600EC495E /* Key List */, D29A0002240C140500C1387D /* Key Detail Info */, D29A0003240C141200C1387D /* Public Key */, - 5ADEDCB423A4262600EC495E /* Key List */, 5ADEDCB723A426E900EC495E /* Key Details */, ); path = KeySettings; diff --git a/FlowCrypt/Controllers/Settings/KeySettings/Key List/KeySettingsViewController.swift b/FlowCrypt/Controllers/Settings/KeySettings/Key List/KeySettingsViewController.swift index f8277d2b9..1818e34d0 100644 --- a/FlowCrypt/Controllers/Settings/KeySettings/Key List/KeySettingsViewController.swift +++ b/FlowCrypt/Controllers/Settings/KeySettings/Key List/KeySettingsViewController.swift @@ -9,6 +9,12 @@ import AsyncDisplayKit import FlowCryptUI +/** + * View controller shows list of user keys + * - User can be redirected here from settings *SettingsViewController* + * - User can proceed to importing keys *SetupManuallyImportKeyViewController* + * - User can see detail information for the key in *KeyDetailViewController* + */ final class KeySettingsViewController: TableNodeViewController { private var keys: [KeyDetails] = [] private let decorator: KeySettingsViewDecoratorType From a69ea04eeeaa0e9fa5efc11a53cdcb0ed0a581aa Mon Sep 17 00:00:00 2001 From: Anton Kharchevskyi Date: Thu, 24 Jun 2021 22:57:10 +0300 Subject: [PATCH 22/35] Update KeyDetailViewController --- .../KeySettings/Key Details/KeyDetailViewController.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/FlowCrypt/Controllers/Settings/KeySettings/Key Details/KeyDetailViewController.swift b/FlowCrypt/Controllers/Settings/KeySettings/Key Details/KeyDetailViewController.swift index 414a7135b..517741777 100644 --- a/FlowCrypt/Controllers/Settings/KeySettings/Key Details/KeyDetailViewController.swift +++ b/FlowCrypt/Controllers/Settings/KeySettings/Key Details/KeyDetailViewController.swift @@ -9,6 +9,10 @@ import AsyncDisplayKit import FlowCryptUI +/** + * View controller which shows possible option for the keys, like show it's public part, details, copy or share it. + * - User can be redirected here from settings *KeyDetailViewController* + */ final class KeyDetailViewController: TableNodeViewController { enum Parts: Int, CaseIterable { case description, publicInfo, keyDetails, copy, save, privateInfo From 9b296608dbeda774e23306d2817edcf7bb939fdd Mon Sep 17 00:00:00 2001 From: Anton Kharchevskyi Date: Thu, 24 Jun 2021 22:57:48 +0300 Subject: [PATCH 23/35] Update PublicKeyDetailViewController --- .../Public Key/PublicKeyDetailViewController.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/FlowCrypt/Controllers/Settings/KeySettings/Public Key/PublicKeyDetailViewController.swift b/FlowCrypt/Controllers/Settings/KeySettings/Public Key/PublicKeyDetailViewController.swift index 27a25ed07..1f13c0369 100644 --- a/FlowCrypt/Controllers/Settings/KeySettings/Public Key/PublicKeyDetailViewController.swift +++ b/FlowCrypt/Controllers/Settings/KeySettings/Public Key/PublicKeyDetailViewController.swift @@ -9,6 +9,10 @@ import AsyncDisplayKit import FlowCryptUI +/** + * View controller which shows information about public key + * - User can be redirected here from settings *KeyDetailViewController* + */ final class PublicKeyDetailViewController: TableNodeViewController { private let text: String From 2d8e2428d6e86334489e1bdf4a1421cd4a2c83bb Mon Sep 17 00:00:00 2001 From: Anton Kharchevskyi Date: Thu, 24 Jun 2021 22:58:44 +0300 Subject: [PATCH 24/35] Update KeyDetailInfoViewController --- .../Key Detail Info/KeyDetailInfoViewController.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/FlowCrypt/Controllers/Settings/KeySettings/Key Detail Info/KeyDetailInfoViewController.swift b/FlowCrypt/Controllers/Settings/KeySettings/Key Detail Info/KeyDetailInfoViewController.swift index c0c714b9f..3f37a3c6a 100644 --- a/FlowCrypt/Controllers/Settings/KeySettings/Key Detail Info/KeyDetailInfoViewController.swift +++ b/FlowCrypt/Controllers/Settings/KeySettings/Key Detail Info/KeyDetailInfoViewController.swift @@ -9,6 +9,10 @@ import AsyncDisplayKit import FlowCryptUI +/** + * View controller which shows information about key details (key words, fingerprint ...) + * - User can be redirected here from settings *KeyDetailViewController* + */ final class KeyDetailInfoViewController: TableNodeViewController { enum Parts: Int, CaseIterable { case keyWord, fingerptint, longId, date, users, separator From fdac97757c269e8de387bffcb965524da0bdb625 Mon Sep 17 00:00:00 2001 From: Anton Kharchevskyi Date: Thu, 24 Jun 2021 23:00:13 +0300 Subject: [PATCH 25/35] Update LegalViewController --- .../Controllers/Settings/KeyLegal/LegalViewController.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/FlowCrypt/Controllers/Settings/KeyLegal/LegalViewController.swift b/FlowCrypt/Controllers/Settings/KeyLegal/LegalViewController.swift index e4c1c85e9..218a24fbb 100644 --- a/FlowCrypt/Controllers/Settings/KeyLegal/LegalViewController.swift +++ b/FlowCrypt/Controllers/Settings/KeyLegal/LegalViewController.swift @@ -8,6 +8,10 @@ import UIKit +/** + * View controller which shows legal information (privacy, license, sources, terms) + * - User can be redirected here from settings *SettingsViewController* + */ final class LegalViewController: UIViewController { private let provider: LegalViewControllersProviderType private lazy var segment: SegmentedViewController = SegmentedViewController( From ee1f7b9a9271709b1fb979e6c2acf81dda5fe702 Mon Sep 17 00:00:00 2001 From: Anton Kharchevskyi Date: Thu, 24 Jun 2021 23:00:43 +0300 Subject: [PATCH 26/35] Minor updates --- .../Key Detail Info/KeyDetailInfoViewController.swift | 2 +- .../KeySettings/Key Details/KeyDetailViewController.swift | 2 +- .../KeySettings/Public Key/PublicKeyDetailViewController.swift | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/FlowCrypt/Controllers/Settings/KeySettings/Key Detail Info/KeyDetailInfoViewController.swift b/FlowCrypt/Controllers/Settings/KeySettings/Key Detail Info/KeyDetailInfoViewController.swift index 3f37a3c6a..d704d812e 100644 --- a/FlowCrypt/Controllers/Settings/KeySettings/Key Detail Info/KeyDetailInfoViewController.swift +++ b/FlowCrypt/Controllers/Settings/KeySettings/Key Detail Info/KeyDetailInfoViewController.swift @@ -11,7 +11,7 @@ import FlowCryptUI /** * View controller which shows information about key details (key words, fingerprint ...) - * - User can be redirected here from settings *KeyDetailViewController* + * - User can be redirected here from *KeyDetailViewController* */ final class KeyDetailInfoViewController: TableNodeViewController { enum Parts: Int, CaseIterable { diff --git a/FlowCrypt/Controllers/Settings/KeySettings/Key Details/KeyDetailViewController.swift b/FlowCrypt/Controllers/Settings/KeySettings/Key Details/KeyDetailViewController.swift index 517741777..920b38649 100644 --- a/FlowCrypt/Controllers/Settings/KeySettings/Key Details/KeyDetailViewController.swift +++ b/FlowCrypt/Controllers/Settings/KeySettings/Key Details/KeyDetailViewController.swift @@ -11,7 +11,7 @@ import FlowCryptUI /** * View controller which shows possible option for the keys, like show it's public part, details, copy or share it. - * - User can be redirected here from settings *KeyDetailViewController* + * - User can be redirected here from *KeyDetailViewController* */ final class KeyDetailViewController: TableNodeViewController { enum Parts: Int, CaseIterable { diff --git a/FlowCrypt/Controllers/Settings/KeySettings/Public Key/PublicKeyDetailViewController.swift b/FlowCrypt/Controllers/Settings/KeySettings/Public Key/PublicKeyDetailViewController.swift index 1f13c0369..e587cf129 100644 --- a/FlowCrypt/Controllers/Settings/KeySettings/Public Key/PublicKeyDetailViewController.swift +++ b/FlowCrypt/Controllers/Settings/KeySettings/Public Key/PublicKeyDetailViewController.swift @@ -11,7 +11,7 @@ import FlowCryptUI /** * View controller which shows information about public key - * - User can be redirected here from settings *KeyDetailViewController* + * - User can be redirected here from *KeyDetailViewController* */ final class PublicKeyDetailViewController: TableNodeViewController { private let text: String From 2368361f25ee7395a7a6ccd220694f154eb5bc82 Mon Sep 17 00:00:00 2001 From: Tom J <6306961+tomholub@users.noreply.github.com> Date: Fri, 25 Jun 2021 04:03:31 +0800 Subject: [PATCH 27/35] Update WebViewController.swift --- FlowCrypt/Common UI/View Controllers/WebViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FlowCrypt/Common UI/View Controllers/WebViewController.swift b/FlowCrypt/Common UI/View Controllers/WebViewController.swift index 7c7a1799f..bfebc88a3 100644 --- a/FlowCrypt/Common UI/View Controllers/WebViewController.swift +++ b/FlowCrypt/Common UI/View Controllers/WebViewController.swift @@ -10,7 +10,7 @@ import UIKit import WebKit /** - * InApp WebViewController to show web content + * InApp WebViewController to show web content. Used for showing privacy policy etc in splash screen and settings */ final class WebViewController: UIViewController { private lazy var webView = WKWebView() From 73f36889de35bdd86c151c1f311bc1e98f21eb87 Mon Sep 17 00:00:00 2001 From: Tom J <6306961+tomholub@users.noreply.github.com> Date: Fri, 25 Jun 2021 04:05:47 +0800 Subject: [PATCH 28/35] Update InboxViewController.swift --- FlowCrypt/Controllers/Inbox/InboxViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FlowCrypt/Controllers/Inbox/InboxViewController.swift b/FlowCrypt/Controllers/Inbox/InboxViewController.swift index e53db4266..5b5a08f82 100644 --- a/FlowCrypt/Controllers/Inbox/InboxViewController.swift +++ b/FlowCrypt/Controllers/Inbox/InboxViewController.swift @@ -9,7 +9,7 @@ import Promises /** * View controller which shows message list of selected folder or inbox - * - Initial view controller of the *main flow* + * - Initial view controller of the *main flow* when user is already signed in * - User can be redirected here via selecting folder from menu *MyMenuViewController* */ final class InboxViewController: ASDKViewController { From 90bae0ae49ffceb61618f571b2158cdc55dd8d5e Mon Sep 17 00:00:00 2001 From: Tom J <6306961+tomholub@users.noreply.github.com> Date: Fri, 25 Jun 2021 04:07:11 +0800 Subject: [PATCH 29/35] Update MessageViewController.swift --- FlowCrypt/Controllers/Msg/MessageViewController.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/FlowCrypt/Controllers/Msg/MessageViewController.swift b/FlowCrypt/Controllers/Msg/MessageViewController.swift index 5c31f11f5..bb731b789 100644 --- a/FlowCrypt/Controllers/Msg/MessageViewController.swift +++ b/FlowCrypt/Controllers/Msg/MessageViewController.swift @@ -8,7 +8,8 @@ import FlowCryptUI import Promises /** - * View controller to show context of the message (sender, subject, message, attachments) + * View controller to render an email message (sender, subject, message body, attachments) + * Also contains buttons to archive, move to trash, move to inbox, mark as unread, and reply */ final class MessageViewController: TableNodeViewController { struct Input { From 1d9cfb5967e02516458b1f7b1b7ffd18a9f6d2e3 Mon Sep 17 00:00:00 2001 From: Tom J <6306961+tomholub@users.noreply.github.com> Date: Fri, 25 Jun 2021 04:08:30 +0800 Subject: [PATCH 30/35] Update ContactDetailViewController.swift --- .../Contacts/Contacts List/ContactDetailViewController.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FlowCrypt/Controllers/Settings/Contacts/Contacts List/ContactDetailViewController.swift b/FlowCrypt/Controllers/Settings/Contacts/Contacts List/ContactDetailViewController.swift index 13a136fa2..b40ac03b7 100644 --- a/FlowCrypt/Controllers/Settings/Contacts/Contacts List/ContactDetailViewController.swift +++ b/FlowCrypt/Controllers/Settings/Contacts/Contacts List/ContactDetailViewController.swift @@ -10,8 +10,8 @@ import AsyncDisplayKit import FlowCryptUI /** - * View controller which shows contacts details(information about ids, fingerprints...) - * - User can be redirected here from settings *ContactsListViewController* + * View controller which shows details about a contact and the public key recorded for it + * - User can be redirected here from settings *ContactsListViewController* by tapping on a particular contact */ final class ContactDetailViewController: TableNodeViewController { typealias ContactDetailAction = (Action) -> Void From f8d492d72fe0ee315454b4535255c24485813c6c Mon Sep 17 00:00:00 2001 From: Tom J <6306961+tomholub@users.noreply.github.com> Date: Fri, 25 Jun 2021 04:09:34 +0800 Subject: [PATCH 31/35] Update ContactsListViewController.swift --- .../Contacts/Contacts List/ContactsListViewController.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/FlowCrypt/Controllers/Settings/Contacts/Contacts List/ContactsListViewController.swift b/FlowCrypt/Controllers/Settings/Contacts/Contacts List/ContactsListViewController.swift index 424931a8b..cbdefba04 100644 --- a/FlowCrypt/Controllers/Settings/Contacts/Contacts List/ContactsListViewController.swift +++ b/FlowCrypt/Controllers/Settings/Contacts/Contacts List/ContactsListViewController.swift @@ -13,6 +13,7 @@ import FlowCryptUI /** * View controller which shows saved user contacts list * - User can be redirected here from settings *SettingsViewController* + * - By tapping on a particular contact, user will be forwarded to *ContactDetailController* */ final class ContactsListViewController: TableNodeViewController { private let decorator: ContactsListDecoratorType From ca5d5541483cafe87ea47ace2170c5e541bceea6 Mon Sep 17 00:00:00 2001 From: Tom J <6306961+tomholub@users.noreply.github.com> Date: Fri, 25 Jun 2021 04:09:50 +0800 Subject: [PATCH 32/35] Update ContactsListViewController.swift --- .../Contacts/Contacts List/ContactsListViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FlowCrypt/Controllers/Settings/Contacts/Contacts List/ContactsListViewController.swift b/FlowCrypt/Controllers/Settings/Contacts/Contacts List/ContactsListViewController.swift index cbdefba04..6105ff505 100644 --- a/FlowCrypt/Controllers/Settings/Contacts/Contacts List/ContactsListViewController.swift +++ b/FlowCrypt/Controllers/Settings/Contacts/Contacts List/ContactsListViewController.swift @@ -13,7 +13,7 @@ import FlowCryptUI /** * View controller which shows saved user contacts list * - User can be redirected here from settings *SettingsViewController* - * - By tapping on a particular contact, user will be forwarded to *ContactDetailController* + * - By tapping on a particular contact, user will be forwarded to *ContactDetailViewController* */ final class ContactsListViewController: TableNodeViewController { private let decorator: ContactsListDecoratorType From 02eb86dcf22c2fcdb8b0191c634d5ff41468d34a Mon Sep 17 00:00:00 2001 From: Tom J <6306961+tomholub@users.noreply.github.com> Date: Fri, 25 Jun 2021 04:10:37 +0800 Subject: [PATCH 33/35] Update KeyDetailInfoViewController.swift --- .../Key Detail Info/KeyDetailInfoViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FlowCrypt/Controllers/Settings/KeySettings/Key Detail Info/KeyDetailInfoViewController.swift b/FlowCrypt/Controllers/Settings/KeySettings/Key Detail Info/KeyDetailInfoViewController.swift index d704d812e..6de221596 100644 --- a/FlowCrypt/Controllers/Settings/KeySettings/Key Detail Info/KeyDetailInfoViewController.swift +++ b/FlowCrypt/Controllers/Settings/KeySettings/Key Detail Info/KeyDetailInfoViewController.swift @@ -10,7 +10,7 @@ import AsyncDisplayKit import FlowCryptUI /** - * View controller which shows information about key details (key words, fingerprint ...) + * View controller which shows information about our own private and public key details (key words, fingerprint ...) * - User can be redirected here from *KeyDetailViewController* */ final class KeyDetailInfoViewController: TableNodeViewController { From 2b91235ec42bdc9a3354fca115101a706b077a36 Mon Sep 17 00:00:00 2001 From: Tom J <6306961+tomholub@users.noreply.github.com> Date: Fri, 25 Jun 2021 04:15:40 +0800 Subject: [PATCH 34/35] Update EmailProviderViewController.swift --- .../Controllers/SignIn Other/EmailProviderViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FlowCrypt/Controllers/SignIn Other/EmailProviderViewController.swift b/FlowCrypt/Controllers/SignIn Other/EmailProviderViewController.swift index 487abfbfe..94fb20181 100644 --- a/FlowCrypt/Controllers/SignIn Other/EmailProviderViewController.swift +++ b/FlowCrypt/Controllers/SignIn Other/EmailProviderViewController.swift @@ -13,7 +13,7 @@ import Promises /** * Controller that gives a possibility for the user to enter information about his email provider like, account, imap/smtp information * - User redirects here from SignInViewController - * - After successful connection user will be redirected to *main flow* + * - After successful connection user will be redirected to *main flow* which would typically means *SetupInitialViewController* */ final class EmailProviderViewController: TableNodeViewController { private enum UserError: Error { From dabace1e4cb1f6fa44bca3240d9d48f30b7744e5 Mon Sep 17 00:00:00 2001 From: Anton Kharchevskyi Date: Thu, 24 Jun 2021 23:19:18 +0300 Subject: [PATCH 35/35] Rename InboxViewControllerContainer --- FlowCrypt.xcodeproj/project.pbxproj | 35 +++++++++---------- ...ift => InboxViewContainerController.swift} | 4 +-- .../Main/SideMenuNavigationController.swift | 2 +- .../EmailProviderViewController.swift | 2 +- 4 files changed, 20 insertions(+), 23 deletions(-) rename FlowCrypt/Controllers/Inbox/Container/{InboxViewControllerContainer.swift => InboxViewContainerController.swift} (97%) diff --git a/FlowCrypt.xcodeproj/project.pbxproj b/FlowCrypt.xcodeproj/project.pbxproj index 6019e751a..786d34444 100644 --- a/FlowCrypt.xcodeproj/project.pbxproj +++ b/FlowCrypt.xcodeproj/project.pbxproj @@ -11,16 +11,13 @@ 04B472951ECE29F600B8266F /* MyMenuViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B472921ECE29F600B8266F /* MyMenuViewController.swift */; }; 04B472961ECE29F600B8266F /* SideMenuNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B472931ECE29F600B8266F /* SideMenuNavigationController.swift */; }; 211392A5266511E6009202EC /* PubLookup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 211392A4266511E6009202EC /* PubLookup.swift */; }; - 21489B6B267B7BD800BDE4AC /* FilesManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21489B6A267B7BD800BDE4AC /* FilesManagerTests.swift */; }; - 21489B6C267B7C6A00BDE4AC /* FilesManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 215897E7267A553200423694 /* FilesManager.swift */; }; - 21489B6E267B7D5000BDE4AC /* FileMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21489B6D267B7D5000BDE4AC /* FileMock.swift */; }; - 215897E8267A553300423694 /* FilesManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 215897E7267A553200423694 /* FilesManager.swift */; }; - 2196A2202684B9BE001B9E00 /* URLExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2196A21F2684B9BE001B9E00 /* URLExtension.swift */; }; 21489B78267CB42400BDE4AC /* ClientConfigurationProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21489B77267CB42400BDE4AC /* ClientConfigurationProvider.swift */; }; 21489B7A267CB4DF00BDE4AC /* ClientConfigurationObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21489B79267CB4DF00BDE4AC /* ClientConfigurationObject.swift */; }; 21489B7C267CBA0E00BDE4AC /* ClientConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21489B7B267CBA0E00BDE4AC /* ClientConfiguration.swift */; }; 21489B80267CC39E00BDE4AC /* OrganisationalRulesService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21489B7F267CC39E00BDE4AC /* OrganisationalRulesService.swift */; }; 21489B83267CC99C00BDE4AC /* OrganisationalRulesServiceError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21489B82267CC99C00BDE4AC /* OrganisationalRulesServiceError.swift */; }; + 215897E8267A553300423694 /* FilesManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 215897E7267A553200423694 /* FilesManager.swift */; }; + 2196A2202684B9BE001B9E00 /* URLExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2196A21F2684B9BE001B9E00 /* URLExtension.swift */; }; 21C7DEFC26669A3700C44800 /* CalendarExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21C7DEFB26669A3700C44800 /* CalendarExtension.swift */; }; 21C7DEFE26669CE100C44800 /* DateFormattingExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F56BD3723438C7000A7371A /* DateFormattingExtensions.swift */; }; 21C7DF0526697DA500C44800 /* PromiseKitExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21C7DF0426697DA500C44800 /* PromiseKitExtension.swift */; }; @@ -109,7 +106,7 @@ 9F7E5137267AA51B00CE37C3 /* AlertsFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F7E5136267AA51B00CE37C3 /* AlertsFactory.swift */; }; 9F8220D526336626004B2009 /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F8220D426336626004B2009 /* Logger.swift */; }; 9F82779823737E0900E19C07 /* MessageViewDecorator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F82779723737E0900E19C07 /* MessageViewDecorator.swift */; }; - 9F82D352256D74FA0069A702 /* InboxViewControllerContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F82D351256D74FA0069A702 /* InboxViewControllerContainer.swift */; }; + 9F82D352256D74FA0069A702 /* InboxViewContainerController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F82D351256D74FA0069A702 /* InboxViewContainerController.swift */; }; 9F92EE72236F165E009BE0D7 /* EncryptedStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F92EE71236F165E009BE0D7 /* EncryptedStorage.swift */; }; 9F9361A52573CE260009912F /* MessageProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F9361A42573CE260009912F /* MessageProvider.swift */; }; 9F9362062573D0C80009912F /* Gmail+MessagesList.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F9362052573D0C80009912F /* Gmail+MessagesList.swift */; }; @@ -366,13 +363,13 @@ 211392A4266511E6009202EC /* PubLookup.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PubLookup.swift; sourceTree = ""; }; 21489B6A267B7BD800BDE4AC /* FilesManagerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FilesManagerTests.swift; sourceTree = ""; }; 21489B6D267B7D5000BDE4AC /* FileMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileMock.swift; sourceTree = ""; }; - 215897E7267A553200423694 /* FilesManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FilesManager.swift; sourceTree = ""; }; - 2196A21F2684B9BE001B9E00 /* URLExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLExtension.swift; sourceTree = ""; }; 21489B77267CB42400BDE4AC /* ClientConfigurationProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClientConfigurationProvider.swift; sourceTree = ""; }; 21489B79267CB4DF00BDE4AC /* ClientConfigurationObject.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClientConfigurationObject.swift; sourceTree = ""; }; 21489B7B267CBA0E00BDE4AC /* ClientConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClientConfiguration.swift; sourceTree = ""; }; 21489B7F267CC39E00BDE4AC /* OrganisationalRulesService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrganisationalRulesService.swift; sourceTree = ""; }; 21489B82267CC99C00BDE4AC /* OrganisationalRulesServiceError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrganisationalRulesServiceError.swift; sourceTree = ""; }; + 215897E7267A553200423694 /* FilesManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FilesManager.swift; sourceTree = ""; }; + 2196A21F2684B9BE001B9E00 /* URLExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLExtension.swift; sourceTree = ""; }; 21C7DEFB26669A3700C44800 /* CalendarExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CalendarExtension.swift; sourceTree = ""; }; 21C7DF0426697DA500C44800 /* PromiseKitExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PromiseKitExtension.swift; sourceTree = ""; }; 21C7DF08266C0D8F00C44800 /* EnterpriseServerApi.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnterpriseServerApi.swift; sourceTree = ""; }; @@ -513,7 +510,7 @@ 9F82779923737E1900E19C07 /* MessageSenderNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageSenderNode.swift; sourceTree = ""; }; 9F82779B23737E2A00E19C07 /* MessageSubjectNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageSubjectNode.swift; sourceTree = ""; }; 9F82779D23737E3800E19C07 /* MessageTextSubjectNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageTextSubjectNode.swift; sourceTree = ""; }; - 9F82D351256D74FA0069A702 /* InboxViewControllerContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InboxViewControllerContainer.swift; sourceTree = ""; }; + 9F82D351256D74FA0069A702 /* InboxViewContainerController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InboxViewContainerController.swift; sourceTree = ""; }; 9F8D5E61236B04E300186E43 /* CellNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CellNode.swift; sourceTree = ""; }; 9F92EE6F236F144C009BE0D7 /* TextFieldCellNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextFieldCellNode.swift; sourceTree = ""; }; 9F92EE71236F165E009BE0D7 /* EncryptedStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EncryptedStorage.swift; sourceTree = ""; }; @@ -783,14 +780,6 @@ path = FilesManager; sourceTree = ""; }; - 215897E6267A551300423694 /* FilesManager */ = { - isa = PBXGroup; - children = ( - 215897E7267A553200423694 /* FilesManager.swift */, - ); - path = FilesManager; - sourceTree = ""; - }; 21489B81267CC3BC00BDE4AC /* Organisational Rules Service */ = { isa = PBXGroup; children = ( @@ -801,6 +790,14 @@ path = "Organisational Rules Service"; sourceTree = ""; }; + 215897E6267A551300423694 /* FilesManager */ = { + isa = PBXGroup; + children = ( + 215897E7267A553200423694 /* FilesManager.swift */, + ); + path = FilesManager; + sourceTree = ""; + }; 21CE25D32650034500ADFF4B /* WKDURLs */ = { isa = PBXGroup; children = ( @@ -1147,7 +1144,7 @@ 9F4300A52571016400791CFB /* Container */ = { isa = PBXGroup; children = ( - 9F82D351256D74FA0069A702 /* InboxViewControllerContainer.swift */, + 9F82D351256D74FA0069A702 /* InboxViewContainerController.swift */, 9F4300CB2571045B00791CFB /* InboxViewControllerContainerDecorator.swift */, ); path = Container; @@ -2525,7 +2522,7 @@ 9FC7EAB3266A404D00F3BF5D /* PassPhraseObject.swift in Sources */, 9F31AB8C23298B3F00CF87EA /* Imap+retry.swift in Sources */, 9F79229426696B9300DA3D80 /* KeyDataStorage.swift in Sources */, - 9F82D352256D74FA0069A702 /* InboxViewControllerContainer.swift in Sources */, + 9F82D352256D74FA0069A702 /* InboxViewContainerController.swift in Sources */, D227C0E3250538100070F805 /* LocalFoldersProvider.swift in Sources */, 9FA405C7265AEBA50084D133 /* SetupGenerateKeyViewController.swift in Sources */, 9F6EE1552597399D0059BA51 /* BackupProvider.swift in Sources */, diff --git a/FlowCrypt/Controllers/Inbox/Container/InboxViewControllerContainer.swift b/FlowCrypt/Controllers/Inbox/Container/InboxViewContainerController.swift similarity index 97% rename from FlowCrypt/Controllers/Inbox/Container/InboxViewControllerContainer.swift rename to FlowCrypt/Controllers/Inbox/Container/InboxViewContainerController.swift index 6417bbfe6..8c4cb1563 100644 --- a/FlowCrypt/Controllers/Inbox/Container/InboxViewControllerContainer.swift +++ b/FlowCrypt/Controllers/Inbox/Container/InboxViewContainerController.swift @@ -14,7 +14,7 @@ import FlowCryptUI * View controller which serves as intermediate controller * - Used to fetch folders and get correct path for "inbox" folder */ -final class InboxViewControllerContainer: TableNodeViewController { +final class InboxViewContainerController: TableNodeViewController { private let inbox = "inbox" private enum InboxViewControllerContainerError: Error { @@ -104,7 +104,7 @@ final class InboxViewControllerContainer: TableNodeViewController { } } -extension InboxViewControllerContainer: ASTableDelegate, ASTableDataSource { +extension InboxViewContainerController: ASTableDelegate, ASTableDataSource { func tableNode(_ tableNode: ASTableNode, numberOfRowsInSection section: Int) -> Int { switch state { case .empty, .loading: diff --git a/FlowCrypt/Controllers/SideMenu/Main/SideMenuNavigationController.swift b/FlowCrypt/Controllers/SideMenu/Main/SideMenuNavigationController.swift index 6f0abf626..0cd27d8da 100644 --- a/FlowCrypt/Controllers/SideMenu/Main/SideMenuNavigationController.swift +++ b/FlowCrypt/Controllers/SideMenu/Main/SideMenuNavigationController.swift @@ -53,7 +53,7 @@ final class SideMenuNavigationController: ENSideMenuNavigationController { convenience init() { let menu = MyMenuViewController() - let contentViewController = InboxViewControllerContainer() + let contentViewController = InboxViewContainerController() self.init(menuViewController: menu, contentViewController: contentViewController) menuViewContoller = menu sideMenu = ENSideMenu(sourceView: view, menuViewController: menu, menuPosition: .left).then { diff --git a/FlowCrypt/Controllers/SignIn Other/EmailProviderViewController.swift b/FlowCrypt/Controllers/SignIn Other/EmailProviderViewController.swift index 94fb20181..8eb52faf5 100644 --- a/FlowCrypt/Controllers/SignIn Other/EmailProviderViewController.swift +++ b/FlowCrypt/Controllers/SignIn Other/EmailProviderViewController.swift @@ -13,7 +13,7 @@ import Promises /** * Controller that gives a possibility for the user to enter information about his email provider like, account, imap/smtp information * - User redirects here from SignInViewController - * - After successful connection user will be redirected to *main flow* which would typically means *SetupInitialViewController* + * - After successful connection user will be redirected to *setup flow* which would typically means *SetupInitialViewController* */ final class EmailProviderViewController: TableNodeViewController { private enum UserError: Error {