Skip to content

Commit 871da27

Browse files
authored
Merge pull request #42 from Async-Swift/Stamp/checkStamp
[HotFix] 앱 재시동후 Stamp가 보이지 않은 문제
2 parents e6d17f4 + 95d03a3 commit 871da27

File tree

3 files changed

+9
-19
lines changed

3 files changed

+9
-19
lines changed

.well-known/apple-app-site-association

Lines changed: 0 additions & 11 deletions
This file was deleted.

AsyncSwift/Observed/AppData.swift

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,22 @@ final class AppData: ObservableObject {
1313
@Published var currentTab: Tab = .event
1414

1515
private var currentStamp: Stamp?
16-
lazy var isStampExist: Bool = {
17-
KeyChain.shared.getItem(key: currentStamp?.title) != nil
18-
}()
16+
var isStampExist: Bool {
17+
if currentStamp == nil {
18+
fetchCurrentStamp()
19+
}
20+
21+
return KeyChain.shared.getItem(key: currentStamp?.title) != nil
22+
}
1923

2024
init(){
2125
fetchCurrentStamp()
2226
}
2327

2428
func checkLink(url: URL) -> Bool {
25-
// URL Example = https://asyncswift.info?tab=stamp
26-
// URL Example = https://asyncswift.info?tab=event
29+
// URL Example = https://asyncswift.info?tab=Stamp
30+
// URL Example = https://asyncswift.info?tab=Event
2731
guard URLComponents(url: url, resolvingAgainstBaseURL: true)?.host != nil else { return false }
28-
print(url)
2932
var queries = [String: String]()
3033
for item in URLComponents(url: url, resolvingAgainstBaseURL: true)?.queryItems ?? [] {
3134
queries[item.name] = item.value
@@ -36,7 +39,6 @@ final class AppData: ObservableObject {
3639
switch queries["tab"] {
3740
case Tab.stamp.rawValue:
3841
KeyChain.shared.addItem(key: currentStampName, pwd: "true") ? print("Adding Stamp History KeyChain is Success") : print("Adding Stamp History is Fail")
39-
self.isStampExist = true
4042
currentTab = .stamp
4143
case Tab.event.rawValue:
4244
currentTab = .event

CNAME

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)