Skip to content
Open
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
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import BitwardenKit

// MARK: - VaultUnlockAction

/// Synchronous actions that can be handled by a `VaultUnlockProcessor`.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import BitwardenKit

// MARK: - VaultUnlockState

/// An object that defines the current state of a `VaultUnlockView`.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import BitwardenKit

/// A protocol for an object that performs navigation via routes.
@MainActor
public protocol Coordinator<Route, Event>: AnyObject {
Expand Down Expand Up @@ -156,7 +158,7 @@ extension Coordinator where Self: HasNavigator {
/// - Parameter text: The text of the toast to display.
///
func showToast(_ text: String) {
navigator?.showToast(Toast(text: text))
navigator?.showToast(Toast(title: text))
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import BitwardenKit
import SwiftUI

// MARK: - Navigator
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import BitwardenKit

// MARK: - ImportItemsAction

/// Synchronous actions handled by an `ImportItemsProcessor`.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import BitwardenKit
import BitwardenResources
import Foundation

Expand Down Expand Up @@ -90,7 +91,7 @@ extension ImportItemsProcessor: FileSelectionDelegate {
.twoFasJson
}
try await services.importItemsService.importItems(data: data, format: importFileFormat)
state.toast = Toast(text: Localizations.itemsImported)
state.toast = Toast(title: Localizations.itemsImported)
} catch TwoFasImporterError.passwordProtectedFile {
coordinator.showAlert(.twoFasPasswordProtected())
} catch DecodingError.dataCorrupted {
Expand Down Expand Up @@ -148,7 +149,7 @@ extension ImportItemsProcessor: AuthenticatorKeyCaptureDelegate {
func parseAndValidateAutomaticCaptureKey(_ key: String) async {
do {
try await services.importItemsService.importItems(data: key.data(using: .utf8)!, format: .googleProtobuf)
state.toast = Toast(text: Localizations.itemsImported)
state.toast = Toast(title: Localizations.itemsImported)
} catch {
services.errorReporter.log(error: error)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import BitwardenKit
import BitwardenKitMocks
import BitwardenResources
import Foundation
Expand Down Expand Up @@ -125,7 +126,7 @@ class ImportItemsProcessorTests: BitwardenTestCase {
subject.fileSelectionCompleted(fileName: "Filename", data: data)

try await waitForAsync { self.subject.state.toast != nil }
XCTAssertEqual(subject.state.toast?.text, Toast(text: Localizations.itemsImported).text)
XCTAssertEqual(subject.state.toast?.title, Toast(title: Localizations.itemsImported).title)
XCTAssertEqual(importItemsService.importItemsData, data)
}

Expand Down Expand Up @@ -223,7 +224,7 @@ class ImportItemsProcessorTests: BitwardenTestCase {
/// When the Processor receives a `.toastShown(_)` action, it sets the toast in the state.
@MainActor
func test_receive_toastShown() {
let toast = Toast(text: "TOAST!")
let toast = Toast(title: "TOAST!")

subject.receive(.toastShown(toast))
XCTAssertEqual(subject.state.toast, toast)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import BitwardenKit
import Foundation

// MARK: - ImportItemsState
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import BitwardenKit

/// Actions that can be processed by a `SettingsProcessor`.
///
enum SettingsAction: Equatable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ final class SettingsProcessor: StateProcessor<SettingsState, SettingsAction, Set
/// Prepare the text to be copied.
private func handleVersionTapped() {
services.pasteboardService.copy(services.appInfoService.appInfoString)
state.toast = Toast(text: Localizations.valueHasBeenCopied(Localizations.appInfo))
state.toast = Toast(title: Localizations.valueHasBeenCopied(Localizations.appInfo))
}

/// Loads the state of the user's biometric unlock preferences.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import BitwardenKit
import BitwardenKitMocks
import BitwardenResources
import XCTest
Expand Down Expand Up @@ -251,8 +252,8 @@ class SettingsProcessorTests: BitwardenTestCase {
""",
)
XCTAssertEqual(
subject.state.toast?.text,
Toast(text: Localizations.valueHasBeenCopied(Localizations.appInfo)).text,
subject.state.toast?.title,
Toast(title: Localizations.valueHasBeenCopied(Localizations.appInfo)).title,
)
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import BitwardenKit
import BitwardenSdk

/// Synchronous actions that can be processed by an `EditItemProcessor`.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import BitwardenKit
import BitwardenSdk
import Foundation

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import BitwardenKit

// MARK: - ItemListAction

/// Actions that can be processed by a `ItemListProcessor`.
Expand Down
Loading