Skip to content

Commit 176d8e6

Browse files
committed
Merge branch 'version/0.42'
2 parents d423b55 + 68235ef commit 176d8e6

File tree

11 files changed

+59
-22
lines changed

11 files changed

+59
-22
lines changed

UnstoppableWallet/UnstoppableWallet.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12550,7 +12550,7 @@
1255012550
"$(inherited)",
1255112551
"@executable_path/Frameworks",
1255212552
);
12553-
MARKETING_VERSION = 0.42;
12553+
MARKETING_VERSION = 0.42.1;
1255412554
MTL_ENABLE_DEBUG_INFO = YES;
1255512555
ONLY_ACTIVE_ARCH = YES;
1255612556
OfficeMode = true;
@@ -12622,7 +12622,7 @@
1262212622
"$(inherited)",
1262312623
"@executable_path/Frameworks",
1262412624
);
12625-
MARKETING_VERSION = 0.42;
12625+
MARKETING_VERSION = 0.42.1;
1262612626
MTL_ENABLE_DEBUG_INFO = NO;
1262712627
OfficeMode = false;
1262812628
SDKROOT = iphoneos;
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"scale" : "1x"
6+
},
7+
{
8+
"filename" : "[email protected]",
9+
"idiom" : "universal",
10+
"scale" : "2x"
11+
},
12+
{
13+
"filename" : "[email protected]",
14+
"idiom" : "universal",
15+
"scale" : "3x"
16+
}
17+
],
18+
"info" : {
19+
"author" : "xcode",
20+
"version" : 1
21+
}
22+
}
1.31 KB
Loading
1.91 KB
Loading

UnstoppableWallet/UnstoppableWallet/Core/Managers/WatchlistManager.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ class WatchlistManager {
1313
private var cancellables = Set<AnyCancellable>()
1414

1515
private let coinUidsSubject = PassthroughSubject<[String], Never>()
16-
16+
private let showSignalsUpdatedSubject = PassthroughSubject<(), Never>()
17+
1718
var coinUids: [String] {
1819
didSet {
1920
coinUidSet = Set(coinUids)
@@ -48,6 +49,7 @@ class WatchlistManager {
4849
var showSignals: Bool {
4950
didSet {
5051
storage.set(value: showSignals, for: keyShowSignals)
52+
showSignalsUpdatedSubject.send()
5153
// WidgetCenter.shared.reloadTimelines(ofKind: AppWidgetConstants.watchlistWidgetKind)
5254
}
5355
}
@@ -86,6 +88,10 @@ extension WatchlistManager {
8688
coinUidsSubject.eraseToAnyPublisher()
8789
}
8890

91+
var showSignalsUpdatedPublisher: AnyPublisher<(), Never> {
92+
showSignalsUpdatedSubject.eraseToAnyPublisher()
93+
}
94+
8995
var timePeriods: [WatchlistTimePeriod] {
9096
[priceChangeModeManager.day1WatchlistPeriod, .week1, .month1, .month3]
9197
}

UnstoppableWallet/UnstoppableWallet/Modules/Market/AdvancedSearch/MarketAdvancedSearchResultsViewModel.swift

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,14 @@ import Foundation
33
import MarketKit
44

55
class MarketAdvancedSearchResultsViewModel: ObservableObject {
6-
private static let showSignalKey = "advanced_search_show_signal_key"
7-
86
private let currencyManager = App.shared.currencyManager
97
private let purchaseManager = App.shared.purchaseManager
10-
private let userDefaultsStorage = App.shared.userDefaultsStorage
8+
private let watchlistManager = App.shared.watchlistManager
119
private var cancellables = Set<AnyCancellable>()
1210

1311
private let internalMarketInfos: [MarketInfo]
1412
let timePeriod: HsTimePeriod
1513

16-
private var showSignalsVar: Bool {
17-
get {
18-
userDefaultsStorage.value(for: Self.showSignalKey) ?? false
19-
}
20-
set {
21-
userDefaultsStorage.set(value: newValue, for: Self.showSignalKey)
22-
}
23-
}
24-
2514
@Published private(set) var premiumEnabled: Bool = false
2615
@Published var marketInfos: [MarketInfo] = []
2716
@Published var showSignals: Bool = false
@@ -38,7 +27,7 @@ class MarketAdvancedSearchResultsViewModel: ObservableObject {
3827
internalMarketInfos = marketInfos
3928
self.timePeriod = timePeriod
4029

41-
showSignals = premiumEnabled && showSignalsVar
30+
showSignals = premiumEnabled && watchlistManager.showSignals
4231
self.premiumEnabled = premiumEnabled
4332

4433
purchaseManager.$activeFeatures
@@ -53,7 +42,7 @@ class MarketAdvancedSearchResultsViewModel: ObservableObject {
5342
}
5443

5544
private func syncShowSignals() {
56-
showSignals = premiumEnabled && showSignalsVar
45+
showSignals = premiumEnabled && watchlistManager.showSignals
5746
}
5847

5948
private func syncState() {
@@ -73,7 +62,7 @@ extension MarketAdvancedSearchResultsViewModel {
7362
func set(showSignals: Bool) {
7463
stat(page: .markets, section: .searchResults, event: .showSignals(shown: showSignals))
7564
syncState()
76-
showSignalsVar = showSignals
65+
watchlistManager.showSignals = showSignals
7766

7867
self.showSignals = premiumEnabled && showSignals
7968
}

UnstoppableWallet/UnstoppableWallet/Modules/Market/Watchlist/MarketWatchlistViewModel.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ class MarketWatchlistViewModel: ObservableObject {
5959
}
6060
.store(in: &cancellables)
6161

62+
watchlistManager.showSignalsUpdatedPublisher
63+
.sink { [weak self] in
64+
self?.syncShowSignals()
65+
}
66+
.store(in: &cancellables)
67+
6268
purchaseManager.$activeFeatures
6369
.receive(on: DispatchQueue.main)
6470
.sink { [weak self] activeFeatures in

UnstoppableWallet/UnstoppableWallet/Modules/Purchases/PurchaseBottomSheet/PurchaseBottomSheetView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ struct PurchaseBottomSheetView: View {
4040

4141
subscribedDescription()
4242
.multilineTextAlignment(.center)
43+
.frame(height: 64)
4344
.padding(.horizontal, .margin32)
44-
.padding(.vertical, .margin12)
4545

4646
VStack(spacing: .margin12) {
4747
Button(action: {

UnstoppableWallet/UnstoppableWallet/Modules/Purchases/PurchaseBottomSheet/PurchaseBottomSheetViewModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ extension PurchaseBottomSheetViewModel {
169169
let discountPrecentage = ((monthlyPrice - realMonthlyPrice) / monthlyPrice) * 100
170170
discountBadge = ["purchase.period.save".localized.uppercased(), "\(discountPrecentage.rounded(decimal: 0))%"].joined(separator: " ")
171171

172-
priceDescription = "(\([realMonthlyPrice.rounded(decimal: 2).description, period.pricePeriod].joined(separator: "/")))"
172+
priceDescription = "(\([realMonthlyPrice.rounded(decimal: 2).description, "purchase.period.month".localized].joined(separator: "/")))"
173173
priceDescripionAccented = true
174174
} else {
175175
discountBadge = nil

UnstoppableWallet/UnstoppableWallet/Modules/Settings/Main/MainSettingsViewController.swift

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,13 +415,25 @@ class MainSettingsViewController: ThemeViewController {
415415
image: .local(UIImage(named: "academy_1_24")),
416416
title: .body("education.title".localized),
417417
accessoryType: .disclosure,
418-
isLast: true,
419418
action: { [weak self] in
420419
self?.navigationController?.pushViewController(EducationView().toViewController(title: "education.title".localized), animated: true)
421420

422421
stat(page: .settings, event: .open(page: .education))
423422
}
424423
),
424+
tableView.universalRow48(
425+
id: "quiz",
426+
image: .local(UIImage(named: "question_24")),
427+
title: .body("quiz.title".localized),
428+
accessoryType: .disclosure,
429+
autoDeselect: true,
430+
isLast: true,
431+
action: {
432+
UrlManager.open(url: "https://t.me/\(AppConfig.appTokenTelegramAccount)/app")
433+
434+
stat(page: .settings, event: .open(page: .externalTelegram))
435+
}
436+
),
425437
]
426438
}
427439

@@ -524,6 +536,7 @@ class MainSettingsViewController: ThemeViewController {
524536
title: .body("settings.tell_friends".localized),
525537
accessoryType: .disclosure,
526538
autoDeselect: true,
539+
isLast: true,
527540
action: { [weak self] in
528541
self?.openTellFriends()
529542
}

0 commit comments

Comments
 (0)