increase performance??

This commit is contained in:
neon443 committed 2026-05-04 20:21:33 +01:00
1 parent 0957e3b4c3
commit 2a135e7196
8 files changed
+52 -27

No files matched your search

@@ -46,6 +46,7 @@ struct DownloadedView: View {
pack: nil,
width: 75,
style: .plainWithMenu,
animate: false,
edit: false
)
// GeometryReader { geo in
+2 -1
View File
@@ -31,7 +31,8 @@ struct JumboMojiTestView: View {
items: jumboMoji.items,
pack: nil,
width: CGFloat(jumboMoji.width),
style: .jumboMoji
style: .jumboMoji,
animate: false
)
.frame(width: 100, height: 100)
Text(jumboMoji.description)
+18 -9
View File
@@ -144,17 +144,26 @@ extension View {
}
struct fadeIn: ViewModifier {
@State private var enabled: Bool
@State private var isVisible: Bool = false
init(enabled: Bool = true) {
self.enabled = enabled
}
func body(content: Content) -> some View {
content
.opacity(isVisible ? 1 : 0)
.scaleEffect(isVisible ? 1 : 0)
.onAppear {
withAnimation { isVisible = true }
}
.onDisappear {
withAnimation { isVisible = false }
}
if enabled {
content
.opacity(isVisible ? 1 : 0)
.scaleEffect(isVisible ? 1 : 0)
.onAppear {
withAnimation { isVisible = true }
}
.onDisappear {
withAnimation { isVisible = false }
}
} else {
content
}
}
}
@@ -11,23 +11,24 @@ import Haptics
struct StickerPreview: View {
@State var sticker: any StickerProtocol
@State var gifImage: Image?
@State var animate: Bool = true
var body: some View {
if sticker.isLocal {
//local
GifView(url: sticker.localImageURL)
GifView(url: sticker.localImageURL, animate: animate)
} else {
//remote
if sticker.type == .slackEmoji {
GifView(url: sticker.remoteImageURL)
GifView(url: sticker.remoteImageURL, animate: animate)
} else {
let gif = sticker as! Gif
if let giphyImages = gif.giphyImages,
let preview_gif = giphyImages.preview_gif,
let url = URL(string: preview_gif.url) {
GifView(url: url)
GifView(url: url, animate: animate)
} else {
GifView(url: gif.remoteImageURL)
GifView(url: gif.remoteImageURL, animate: animate)
.overlay {
Image(systemName:
"square.arrowtriangle.4.outward")
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.