mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-23 10:02:46 +02:00
@@ -16,7 +16,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
class UserIndicatorPresenterSpy: UserIndicatorPresentable {
|
||||
class UserIndicatorPresenterSpy: UserIndicatorViewPresentable {
|
||||
var intel = [String]()
|
||||
|
||||
func present() {
|
||||
|
||||
@@ -17,9 +17,10 @@
|
||||
import Foundation
|
||||
|
||||
/// A presenter associated with and called by a `UserIndicator`, and responsible for the underlying view shown on the screen.
|
||||
public protocol UserIndicatorPresentable {
|
||||
public protocol UserIndicatorViewPresentable {
|
||||
/// Called when the `UserIndicator` is started (manually or by the `UserIndicatorQueue`)
|
||||
func present()
|
||||
/// Called when the `UserIndicator` is manually cancelled or completed
|
||||
func dismiss()
|
||||
}
|
||||
|
||||
|
||||
@@ -28,8 +28,11 @@ public class UserIndicatorQueue {
|
||||
}
|
||||
}
|
||||
|
||||
public static let shared = UserIndicatorQueue()
|
||||
private var queue = [Weak<UserIndicator>]()
|
||||
private var queue: [Weak<UserIndicator>]
|
||||
|
||||
public init() {
|
||||
queue = []
|
||||
}
|
||||
|
||||
/// Add a new indicator to the queue by providing a request.
|
||||
///
|
||||
|
||||
@@ -18,10 +18,10 @@ import Foundation
|
||||
|
||||
/// A request used to create an underlying `UserIndicator`, allowing clients to only specify the visual aspects of an indicator.
|
||||
public struct UserIndicatorRequest {
|
||||
internal let presenter: UserIndicatorPresentable
|
||||
internal let presenter: UserIndicatorViewPresentable
|
||||
internal let dismissal: UserIndicatorDismissal
|
||||
|
||||
public init(presenter: UserIndicatorPresentable, dismissal: UserIndicatorDismissal) {
|
||||
public init(presenter: UserIndicatorViewPresentable, dismissal: UserIndicatorDismissal) {
|
||||
self.presenter = presenter
|
||||
self.dismissal = dismissal
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user