Skip to content

Commit b5042cc

Browse files
patch(discordKit): update usages with small API changes
pin DiscordKit dep to latest commit
1 parent 87afcdd commit b5042cc

File tree

6 files changed

+13
-10
lines changed

6 files changed

+13
-10
lines changed

Swiftcord.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1800,8 +1800,8 @@
18001800
isa = XCRemoteSwiftPackageReference;
18011801
repositoryURL = "https://github.com/SwiftcordApp/DiscordKit";
18021802
requirement = {
1803-
branch = devel;
1804-
kind = branch;
1803+
kind = revision;
1804+
revision = c2f7e6a48611fac03456f725f6e4f5d3609d297b;
18051805
};
18061806
};
18071807
DA8AEA6629029747007BAAEA /* XCRemoteSwiftPackageReference "SwiftUI-Introspect" */ = {

Swiftcord.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Swiftcord/Utils/Keychain.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class Keychain {
1919
kSecAttrAccount: "\(Bundle.main.bundleIdentifier!).\(key)",
2020
kSecAttrApplicationTag: tag,
2121
kSecValueData: data
22-
] as CFDictionary
22+
] as [CFString: Any] as CFDictionary
2323

2424
SecItemDelete(query)
2525

@@ -33,7 +33,7 @@ public class Keychain {
3333
kSecAttrAccount: "\(Bundle.main.bundleIdentifier!).\(key)",
3434
kSecAttrApplicationTag: tag,
3535
kSecMatchLimit: kSecMatchLimitOne
36-
] as CFDictionary
36+
] as [CFString: Any] as CFDictionary
3737

3838
return SecItemDelete(query)
3939
}
@@ -50,7 +50,7 @@ public class Keychain {
5050
kSecReturnData: true,
5151
kSecAttrApplicationTag: tag,
5252
kSecMatchLimit: kSecMatchLimitOne
53-
] as CFDictionary
53+
] as [CFString: Any] as CFDictionary
5454

5555
var dataTypeRef: AnyObject?
5656

Swiftcord/Views/ContentView.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ struct ContentView: View {
172172
if state == .gatewayConn { loadLastSelectedGuild() }
173173
if state == .messageLoad,
174174
!seenOnboarding || prevBuild != Bundle.main.infoDictionary?["CFBundleVersion"] as? String { // swiftlint:disable:this indentation_width
175+
// If the user hasn't seen the onboarding (first page), present onboarding immediately
175176
if !seenOnboarding { presentingOnboarding = true }
176177
Task {
177178
do {
@@ -180,7 +181,9 @@ struct ContentView: View {
180181
.body
181182
} catch {
182183
skipWhatsNew = true
184+
return
183185
}
186+
// If the user has already seen the onboarding, present the onboarding sheet only after loading the changelog
184187
presentingOnboarding = true
185188
}
186189
}
@@ -213,7 +216,7 @@ struct ContentView: View {
213216
} content: {
214217
OnboardingView(
215218
skipOnboarding: seenOnboarding,
216-
skipWhatsNew: skipWhatsNew,
219+
skipWhatsNew: $skipWhatsNew,
217220
newMarkdown: $whatsNewMarkdown,
218221
presenting: $presentingOnboarding
219222
)

Swiftcord/Views/Message/StickerView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ struct StickerView: View {
159159
.onHover { hovered = $0 }
160160
.onTapGesture {
161161
if fullSticker == nil { Task {
162-
fullSticker = try? await restAPI.getSticker(id: sticker.id)
162+
fullSticker = try? await restAPI.getSticker(sticker.id)
163163
openPopoverEvt()
164164
}} else {
165165
openPopoverEvt()

Swiftcord/Views/OnboardingView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ struct OnboardingWelcomeView: View {
9090

9191
struct OnboardingView: View {
9292
let skipOnboarding: Bool
93-
let skipWhatsNew: Bool
93+
@Binding var skipWhatsNew: Bool
9494
@Binding var newMarkdown: String?
9595

9696
@State private var showingNew = false

0 commit comments

Comments
 (0)