mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-26 19:34:25 +02:00
Update activity indicators on leaving room
Signed-off-by: Andy Uhnak <andyuhnak@gmail.com>
This commit is contained in:
@@ -17,6 +17,15 @@
|
||||
import Foundation
|
||||
import CommonKit
|
||||
|
||||
/// Type of activity to be shown in the app navigator
|
||||
enum AppActivityType {
|
||||
/// Loading toast with custom label
|
||||
case loading(String)
|
||||
|
||||
/// Success toast with custom label
|
||||
case success(String)
|
||||
}
|
||||
|
||||
/// AppNavigatorProtocol abstract a navigator at app level.
|
||||
/// It enables to perform the navigation within the global app scope (open the side menu, open a room and so on)
|
||||
/// Note: Presentation of the pattern here https://www.swiftbysundell.com/articles/navigation-in-swift/#where-to-navigator
|
||||
@@ -28,11 +37,11 @@ protocol AppNavigatorProtocol {
|
||||
/// Do not use protocol with associatedtype for the moment like presented here https://www.swiftbysundell.com/articles/navigation-in-swift/#where-to-navigator use a separate enum
|
||||
func navigate(to destination: AppNavigatorDestination)
|
||||
|
||||
/// Add loading activity to an app-wide queue of other activitie
|
||||
/// Add new activity, such as loading indicator or a success message, to an app-wide queue of other activities
|
||||
///
|
||||
/// If the queue is empty, the activity will be displayed immediately, otherwise it will be pending
|
||||
/// until the previously added activities have completed / been cancelled.
|
||||
///
|
||||
/// To remove an activity indicator, cancel or deallocate the returned `Activity`
|
||||
func addLoadingActivity() -> Activity
|
||||
func addAppActivity(_ type: AppActivityType) -> Activity
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user