Mercurial > public > simoleon
comparison Simoleon/Settings.swift @ 24:bda6a55d027a
Add Conversion to Favourites
author | Dennis Concepción Martín <dennisconcepcionmartin@gmail.com> |
---|---|
date | Tue, 20 Jul 2021 10:24:21 +0100 |
parents | 699b5bb619db |
children | 933d9ab04374 |
comparison
equal
deleted
inserted
replaced
23:699b5bb619db | 24:bda6a55d027a |
---|---|
19 Picker("Default currency", selection: $selectedCurrencyPair) { | 19 Picker("Default currency", selection: $selectedCurrencyPair) { |
20 ForEach(currencyPairs.sorted(), id: \.self) { currencyPair in | 20 ForEach(currencyPairs.sorted(), id: \.self) { currencyPair in |
21 Text(currencyPair) | 21 Text(currencyPair) |
22 } | 22 } |
23 } | 23 } |
24 .onChange(of: selectedCurrencyPair, perform: { selectedCurrencyPair in | |
25 setDefaultCurrency() | |
26 }) | |
27 } | 24 } |
28 | 25 |
29 Section(header: Text("Stay in touch")) { | 26 Section(header: Text("Stay in touch")) { |
30 Link(destination: URL(string: "https://itunes.apple.com/app/id1576390953?action=write-review")!) { | 27 Link(destination: URL(string: "https://itunes.apple.com/app/id1576390953?action=write-review")!) { |
31 HStack { | 28 HStack { |
62 Link("Website", destination: URL(string: "https://dennistech.io")!) | 59 Link("Website", destination: URL(string: "https://dennistech.io")!) |
63 Link("Privacy Policy", destination: URL(string: "https://dennistech.io")!) | 60 Link("Privacy Policy", destination: URL(string: "https://dennistech.io")!) |
64 Link("Developer's Twitter", destination: URL(string: "https://twitter.com/dennisconcep")!) | 61 Link("Developer's Twitter", destination: URL(string: "https://twitter.com/dennisconcep")!) |
65 } | 62 } |
66 } | 63 } |
64 .onChange(of: selectedCurrencyPair, perform: { selectedCurrencyPair in | |
65 setDefaultCurrency() | |
66 }) | |
67 .onAppear(perform: fetchUserSettings) | 67 .onAppear(perform: fetchUserSettings) |
68 .listStyle(InsetGroupedListStyle()) | 68 .listStyle(InsetGroupedListStyle()) |
69 .navigationTitle("Settings") | 69 .navigationTitle("Settings") |
70 .if(UIDevice.current.userInterfaceIdiom == .phone) { content in | 70 .if(UIDevice.current.userInterfaceIdiom == .phone) { content in |
71 NavigationView { content } | 71 NavigationView { content } |