remove the rror state for stickers cos icba and fixed random divider on the packmanager

This commit is contained in:
neon443 committed 2026-04-08 19:29:27 +01:00
1 parent 88b21dfdc7
commit e3436f1fc9
2 files changed
+8 -18

No files matched your search

@@ -30,6 +30,7 @@ struct EmojiPackManager: View {
.tint(.red)
}
}
Spacer()
NavigationLink {
EmojiPackDetailView(hoarder: hoarder, pack: .constant(.test))
} label: {
@@ -50,7 +51,6 @@ struct EmojiPackManager: View {
}
}
}
Divider()
}
}
+7 -17
View File
@@ -16,8 +16,6 @@ struct GifView: View {
@State var currentI: Int = 0
@State var timer: Timer?
@State var error: Error?
@State var failed: Bool = false
func run() async {
do {
@@ -28,15 +26,11 @@ struct GifView: View {
}
}
} catch {
self.error = error
}
guard self.error == nil && !self.gif.isEmpty else {
print(error)
print(error.localizedDescription)
print("falied loading or empty gif")
withAnimation(.spring) { self.failed = true }
return
}
guard gif.count > 0 else { return }
if timer != nil {
timer!.invalidate()
timer = nil
@@ -56,16 +50,10 @@ struct GifView: View {
// /*@START_MENU_TOKEN@*//*@PLACEHOLDER=Hello, world!@*/Text("Hello, world!")/*@END_MENU_TOKEN@*/
TimelineView(.animation) { tl in
VStack {
if gif.isEmpty && error == nil {
if gif.isEmpty {
ProgressView()
.controlSize(.large)
.frame(maxWidth: .infinity, maxHeight: .infinity)
} else if failed {
Image(systemName: "xmark")
.resizable().scaledToFit()
.padding()
.padding()
.background(.red)
} else {
if currentI < gif.count {
let image = Image(uiImage: .init(cgImage: gif[currentI].frame))
@@ -80,8 +68,10 @@ struct GifView: View {
timer?.invalidate()
timer = nil
}
.task {
await run()
.onAppear {
Task {
await run()
}
}
}
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.