Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions FlowCrypt.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@
9F5F504326FA6C7500294FA2 /* EnterpriseServerApiMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F5F504226FA6C7500294FA2 /* EnterpriseServerApiMock.swift */; };
9F5F504A26FA6C8F00294FA2 /* ClientConfigurationProviderMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F5F504926FA6C8F00294FA2 /* ClientConfigurationProviderMock.swift */; };
9F5FAF6D271DCDAF00B8762B /* MessageActionsHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F5FAF6C271DCDAE00B8762B /* MessageActionsHandler.swift */; };
9F65B0B7277DF2AD005CD19C /* Imap+ThreadOperations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F65B0B6277DF2AD005CD19C /* Imap+ThreadOperations.swift */; };
9F67998B277B222B00AFE5BE /* BigInt in Frameworks */ = {isa = PBXBuildFile; productRef = 9F67998A277B222B00AFE5BE /* BigInt */; };
9F67998C277B3E4000AFE5BE /* BundleExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = E26D5E20275AA417007B8802 /* BundleExtensions.swift */; };
9F67998D277B3E4D00AFE5BE /* CommandLineExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = E26D5E1E275AA295007B8802 /* CommandLineExtensions.swift */; };
Expand Down Expand Up @@ -597,6 +598,7 @@
9F5F504226FA6C7500294FA2 /* EnterpriseServerApiMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnterpriseServerApiMock.swift; sourceTree = "<group>"; };
9F5F504926FA6C8F00294FA2 /* ClientConfigurationProviderMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClientConfigurationProviderMock.swift; sourceTree = "<group>"; };
9F5FAF6C271DCDAE00B8762B /* MessageActionsHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageActionsHandler.swift; sourceTree = "<group>"; };
9F65B0B6277DF2AD005CD19C /* Imap+ThreadOperations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Imap+ThreadOperations.swift"; sourceTree = "<group>"; };
9F696292236091DD003712E1 /* SignInImageNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignInImageNode.swift; sourceTree = "<group>"; };
9F696294236091F4003712E1 /* SignInDescriptionNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignInDescriptionNode.swift; sourceTree = "<group>"; };
9F6EE1542597399D0059BA51 /* BackupProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BackupProvider.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1420,6 +1422,7 @@
children = (
9F88391827270A1A00669B56 /* MessagesThreadOperationsProvider.swift */,
9F883915272709E200669B56 /* MessagesThreadProvider.swift */,
9F65B0B6277DF2AD005CD19C /* Imap+ThreadOperations.swift */,
);
path = Threads;
sourceTree = "<group>";
Expand Down Expand Up @@ -2544,6 +2547,7 @@
51B4AE5327144E590001F33B /* PubKey.swift in Sources */,
21623D1826FA860700A11B9A /* PhotosManager.swift in Sources */,
C132B9B41EC2DBD800763715 /* AppDelegate.swift in Sources */,
9F65B0B7277DF2AD005CD19C /* Imap+ThreadOperations.swift in Sources */,
9F5FAF6D271DCDAF00B8762B /* MessageActionsHandler.swift in Sources */,
9F976592267E19880058419D /* TestData.swift in Sources */,
04B472961ECE29F600B8266F /* SideMenuNavigationController.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ extension MsgListViewController where Self: UIViewController {
}

private func openMsg(appContext: AppContext, with message: Message, path: String) {
let thread = MessageThread(identifier: message.threadId,
snippet: nil,
path: path,
messages: [message])
let thread = MessageThread(
identifier: message.threadId,
snippet: nil,
path: path,
messages: [message]
)
openThread(with: thread, appContext: appContext)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import FlowCryptUI
* - Has not to have an instance!
*/

@MainActor
class SetupCreatePassphraseAbstractViewController: TableNodeViewController, PassPhraseSaveable, NavigationChildController {

enum Parts: Int, CaseIterable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ class ImapSessionProvider: ImapSessionProviderType {

func imapSession() -> IMAPSession? {
guard let imapSession = IMAPSession(user: self.user) else {
assertionFailure("couldn't create IMAP Session with this parameters")
return nil
}
return imapSession
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ extension IMAPSession {
}

guard let auth = user.authType, let connection = ConnectionType(rawValue: imap.connectionType) else {
assertionFailure("Authentication type should be defined on this step")
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion FlowCrypt/Functionality/Mail Provider/MailProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ final class MailProvider {

private func resolveService<T>(of type: T.Type) -> T {
guard let service = services.first(where: { $0.mailServiceProviderType == authType.mailServiceProviderType }) as? T else {
fatalError("Email Provider should support this functionality")
fatalError("Email Provider should support this functionality. Can't resolve dependency for \(type)")
}
return service
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
//
// Imap+ThreadOperations.swift
// FlowCrypt
//
// Created by Anton Kharchevskyi on 30.12.2021
// Copyright © 2017-present FlowCrypt a. s. All rights reserved.
//

import Foundation

// TODO: - Rework in scope of https://github.com/FlowCrypt/flowcrypt-ios/issues/1260
extension Imap: MessagesThreadOperationsProvider {
private var error: Error { AppErr.general("Doesn't support yet") }

func mark(thread: MessageThread, asRead: Bool, in folder: String) async throws {
throw error
}

func delete(thread: MessageThread) async throws {
throw error
}

func moveThreadToTrash(thread: MessageThread) async throws {
throw error
}

func markThreadAsUnread(thread: MessageThread, folder: String) async throws {
throw error
}

func markThreadAsRead(thread: MessageThread, folder: String) async throws {
throw error
}

func archive(thread: MessageThread, in folder: String) async throws {
throw error
}
}