-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
introduce
AppFlow
to support different application flows
- Loading branch information
Showing
24 changed files
with
269 additions
and
220 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// | ||
// AppFlow.swift | ||
// Mlem | ||
// | ||
// Created by mormaer on 08/09/2023. | ||
// | ||
// | ||
|
||
import Foundation | ||
|
||
/// An enumeration that describes the types of flow that are supported by the application | ||
enum AppFlow: Equatable { | ||
/// The onboarding flow | ||
case onboarding | ||
/// An 'signed in'' session with the users `SavedAccount` as an associated value | ||
case account(SavedAccount) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// | ||
// Environment+AppFlow.swift | ||
// Mlem | ||
// | ||
// Created by mormaer on 08/09/2023. | ||
// | ||
// | ||
|
||
import SwiftUI | ||
|
||
private struct AppFlowSetter: EnvironmentKey { | ||
static let defaultValue: (AppFlow) -> Void = { _ in } | ||
} | ||
|
||
extension EnvironmentValues { | ||
var setAppFlow: (AppFlow) -> Void { | ||
get { self[AppFlowSetter.self] } | ||
set { self[AppFlowSetter.self] = newValue } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.