fix typos
Signed-off-by: Bryan Montz <bryanmontz@me.com> Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
committed by
William Casarin
parent
0f1390f412
commit
47e7505573
@@ -285,7 +285,7 @@ struct ContentView: View {
|
|||||||
SideMenuView(damus_state: damus, isSidebarVisible: $isSideBarOpened.animation())
|
SideMenuView(damus_state: damus, isSidebarVisible: $isSideBarOpened.animation())
|
||||||
)
|
)
|
||||||
.navigationDestination(for: Route.self) { route in
|
.navigationDestination(for: Route.self) { route in
|
||||||
route.view(navigationCordinator: navigationCoordinator, damusState: damus_state!)
|
route.view(navigationCoordinator: navigationCoordinator, damusState: damus_state!)
|
||||||
}
|
}
|
||||||
.onReceive(handle_notify(.switched_timeline)) { _ in
|
.onReceive(handle_notify(.switched_timeline)) { _ in
|
||||||
navigationCoordinator.popToRoot()
|
navigationCoordinator.popToRoot()
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ enum WalletConnectState {
|
|||||||
class WalletModel: ObservableObject {
|
class WalletModel: ObservableObject {
|
||||||
var settings: UserSettingsStore
|
var settings: UserSettingsStore
|
||||||
private(set) var previous_state: WalletConnectState
|
private(set) var previous_state: WalletConnectState
|
||||||
var inital_percent: Int
|
var initial_percent: Int
|
||||||
|
|
||||||
@Published private(set) var connect_state: WalletConnectState
|
@Published private(set) var connect_state: WalletConnectState
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@ class WalletModel: ObservableObject {
|
|||||||
self.connect_state = state
|
self.connect_state = state
|
||||||
self.previous_state = .none
|
self.previous_state = .none
|
||||||
self.settings = settings
|
self.settings = settings
|
||||||
self.inital_percent = settings.donation_percent
|
self.initial_percent = settings.donation_percent
|
||||||
}
|
}
|
||||||
|
|
||||||
init(settings: UserSettingsStore) {
|
init(settings: UserSettingsStore) {
|
||||||
@@ -37,7 +37,7 @@ class WalletModel: ObservableObject {
|
|||||||
self.previous_state = .none
|
self.previous_state = .none
|
||||||
self.connect_state = .none
|
self.connect_state = .none
|
||||||
}
|
}
|
||||||
self.inital_percent = settings.donation_percent
|
self.initial_percent = settings.donation_percent
|
||||||
}
|
}
|
||||||
|
|
||||||
func cancel() {
|
func cancel() {
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ enum Route: Hashable {
|
|||||||
case FollowersYouKnow(friendedFollowers: [String], followers: FollowersModel)
|
case FollowersYouKnow(friendedFollowers: [String], followers: FollowersModel)
|
||||||
|
|
||||||
@ViewBuilder
|
@ViewBuilder
|
||||||
func view(navigationCordinator: NavigationCoordinator, damusState: DamusState) -> some View {
|
func view(navigationCoordinator: NavigationCoordinator, damusState: DamusState) -> some View {
|
||||||
switch self {
|
switch self {
|
||||||
case .ProfileByKey(let pubkey):
|
case .ProfileByKey(let pubkey):
|
||||||
ProfileView(damus_state: damusState, pubkey: pubkey)
|
ProfileView(damus_state: damusState, pubkey: pubkey)
|
||||||
@@ -96,11 +96,11 @@ enum Route: Hashable {
|
|||||||
case .Search(let search):
|
case .Search(let search):
|
||||||
SearchView(appstate: damusState, search: search)
|
SearchView(appstate: damusState, search: search)
|
||||||
case .EULA:
|
case .EULA:
|
||||||
EULAView(nav: navigationCordinator)
|
EULAView(nav: navigationCoordinator)
|
||||||
case .Login:
|
case .Login:
|
||||||
LoginView(nav: navigationCordinator)
|
LoginView(nav: navigationCoordinator)
|
||||||
case .CreateAccount:
|
case .CreateAccount:
|
||||||
CreateAccountView(nav: navigationCordinator)
|
CreateAccountView(nav: navigationCoordinator)
|
||||||
case .SaveKeys(let account):
|
case .SaveKeys(let account):
|
||||||
SaveKeysView(account: account)
|
SaveKeysView(account: account)
|
||||||
case .Wallet(let walletModel):
|
case .Wallet(let walletModel):
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ struct SetupView: View {
|
|||||||
}
|
}
|
||||||
.background(DamusBackground(maxHeight: 300), alignment: .top)
|
.background(DamusBackground(maxHeight: 300), alignment: .top)
|
||||||
.navigationDestination(for: Route.self) { route in
|
.navigationDestination(for: Route.self) { route in
|
||||||
route.view(navigationCordinator: navigationCoordinator, damusState: DamusState.empty)
|
route.view(navigationCoordinator: navigationCoordinator, damusState: DamusState.empty)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.navigationBarTitleDisplayMode(.inline)
|
.navigationBarTitleDisplayMode(.inline)
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ struct WalletView: View {
|
|||||||
case .existing(let nwc):
|
case .existing(let nwc):
|
||||||
MainWalletView(nwc: nwc)
|
MainWalletView(nwc: nwc)
|
||||||
.onAppear() {
|
.onAppear() {
|
||||||
model.inital_percent = settings.donation_percent
|
model.initial_percent = settings.donation_percent
|
||||||
}
|
}
|
||||||
.onChange(of: settings.donation_percent) { p in
|
.onChange(of: settings.donation_percent) { p in
|
||||||
guard let profile = damus_state.profiles.lookup(id: damus_state.pubkey) else {
|
guard let profile = damus_state.profiles.lookup(id: damus_state.pubkey) else {
|
||||||
@@ -175,7 +175,7 @@ struct WalletView: View {
|
|||||||
.onDisappear {
|
.onDisappear {
|
||||||
guard let keypair = damus_state.keypair.to_full(),
|
guard let keypair = damus_state.keypair.to_full(),
|
||||||
let profile = damus_state.profiles.lookup(id: damus_state.pubkey),
|
let profile = damus_state.profiles.lookup(id: damus_state.pubkey),
|
||||||
model.inital_percent != profile.damus_donation
|
model.initial_percent != profile.damus_donation
|
||||||
else {
|
else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user