Rename Activity to UserIndicator

This commit is contained in:
Andy Uhnak
2022-02-22 15:26:51 +00:00
parent b80e3bc89e
commit 5bb32d4971
17 changed files with 152 additions and 151 deletions
+7 -7
View File
@@ -17,8 +17,8 @@
import Foundation
import CommonKit
/// Type of activity to be shown in the app navigator
enum AppActivityType {
/// Type of indicator to be shown in the app navigator
enum AppUserIndicatorType {
/// Loading toast with custom label
case loading(String)
@@ -37,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 new activity, such as loading indicator or a success message, to an app-wide queue of other activities
/// Add new indicator, such as loading spinner or a success message, to an app-wide queue of other indicators
///
/// 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.
/// If the queue is empty, the indicator will be displayed immediately, otherwise it will be pending
/// until the previously added indicator have completed / been cancelled.
///
/// To remove an activity indicator, cancel or deallocate the returned `Activity`
func addAppActivity(_ type: AppActivityType) -> Activity
/// To remove an indicator, cancel or deallocate the returned `UserIndicator`
func addUserIndicator(_ type: AppUserIndicatorType) -> UserIndicator
}