mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Remove unnecessary marks, they bring little value
This commit is contained in:
committed by
Stefan Ceriu
parent
198127c5d7
commit
9589c689c3
@@ -29,14 +29,10 @@ struct OnboardingPageContent {
|
||||
let image: ImageAsset
|
||||
}
|
||||
|
||||
// MARK: View model
|
||||
|
||||
enum OnboardingViewModelAction {
|
||||
case login
|
||||
}
|
||||
|
||||
// MARK: View
|
||||
|
||||
struct OnboardingViewState: BindableState {
|
||||
/// The colours of the background gradient shown behind the 4 pages.
|
||||
private let gradientColors = [
|
||||
|
||||
@@ -20,22 +20,12 @@ import SwiftUI
|
||||
typealias OnboardingViewModelType = StateStoreViewModel<OnboardingViewState, OnboardingViewAction>
|
||||
|
||||
class OnboardingViewModel: OnboardingViewModelType, OnboardingViewModelProtocol {
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Private
|
||||
|
||||
// MARK: Public
|
||||
|
||||
var callback: ((OnboardingViewModelAction) -> Void)?
|
||||
|
||||
// MARK: - Setup
|
||||
|
||||
init() {
|
||||
super.init(initialViewState: OnboardingViewState())
|
||||
}
|
||||
|
||||
// MARK: - Public
|
||||
|
||||
override func process(viewAction: OnboardingViewAction) async {
|
||||
switch viewAction {
|
||||
case .login:
|
||||
|
||||
@@ -17,17 +17,11 @@
|
||||
import SwiftUI
|
||||
|
||||
struct OnboardingPageIndicator: View {
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Public
|
||||
|
||||
/// The number of pages that are shown.
|
||||
let pageCount: Int
|
||||
/// The index of the current page
|
||||
let pageIndex: Int
|
||||
|
||||
// MARK: - Setup
|
||||
|
||||
internal init(pageCount: Int, pageIndex: Int) {
|
||||
self.pageCount = pageCount
|
||||
|
||||
|
||||
@@ -17,15 +17,9 @@
|
||||
import SwiftUI
|
||||
|
||||
struct OnboardingPageView: View {
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Public
|
||||
|
||||
/// The content that this page should display.
|
||||
let content: OnboardingPageContent
|
||||
|
||||
// MARK: - Views
|
||||
|
||||
var body: some View {
|
||||
VStack {
|
||||
Image(content.image.name)
|
||||
|
||||
@@ -19,10 +19,6 @@ import SwiftUI
|
||||
|
||||
/// The screen shown at the beginning of the onboarding flow.
|
||||
struct OnboardingScreen: View {
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Private
|
||||
|
||||
@Environment(\.colorScheme) private var colorScheme
|
||||
@Environment(\.layoutDirection) private var layoutDirection
|
||||
|
||||
@@ -34,8 +30,6 @@ struct OnboardingScreen: View {
|
||||
/// The amount of offset to apply when a drag gesture is in progress.
|
||||
@State private var dragOffset: CGFloat = .zero
|
||||
|
||||
// MARK: Public
|
||||
|
||||
@ObservedObject var context: OnboardingViewModel.Context
|
||||
|
||||
var body: some View {
|
||||
|
||||
Reference in New Issue
Block a user