Skip to content

Commit

Permalink
Updates for SwiftUI changes
Browse files Browse the repository at this point in the history
  • Loading branch information
weiran committed Aug 3, 2019
1 parent 67871bc commit 4e5bb47
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Client/Settings-SwiftUI/SettingsStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import SwiftUI
import Combine
import UIKit

class SettingsStore: BindableObject {
class SettingsStore: ObservableObject {
var didChange = PassthroughSubject<Void, Never>()

private enum Keys {
Expand Down
6 changes: 3 additions & 3 deletions Client/Settings-SwiftUI/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import SwiftUI

struct SettingsView: View {
@EnvironmentObject var settings: SettingsStore
@Environment(\.isPresented) private var isPresented: Binding<Bool>?
@Environment(\.presentationMode) private var presentationMode: Binding<PresentationMode>

var body: some View {
NavigationView {
Expand All @@ -35,7 +35,7 @@ struct SettingsView: View {
}

Section(header: Text("MORE")) {
PresentationButton(destination: OnboardingViewControllerWrapper()) {
NavigationLink(destination: OnboardingViewControllerWrapper()) {
Text("Show What's New")
}
}
Expand All @@ -44,7 +44,7 @@ struct SettingsView: View {
.navigationBarItems(trailing:
Button(
action: {
self.isPresented?.value = false
self.presentationMode.value.dismiss()
},
label: {
Text("Close")
Expand Down

0 comments on commit 4e5bb47

Please sign in to comment.