quicker opening of the imessage app, support ios 17 and below again

This commit is contained in:
neon443 committed 2025-11-10 15:14:51 +00:00
1 parent 6d4eb5da36
commit 1c4ef6896d
8 files changed
+219 -88

No files matched your search

+64
View File
@@ -0,0 +1,64 @@
//
// DownloadedView.swift
// StickerSlack
//
// Created by neon443 on 10/11/2025.
//
import SwiftUI
struct DownloadedView: View {
@ObservedObject var hoarder: EmojiHoarder = .shared
@Environment(\.colorScheme) var colorScheme
var isDark: Bool { colorScheme == .dark }
var minColWidth: CGFloat { 75 }
var spacing: CGFloat { 10 }
var col: GridItem {
GridItem(
.flexible(minimum: minColWidth, maximum: 125),
spacing: spacing,
alignment: .center
)
}
var body: some View {
ScrollView {
let columns: Int = max(1, Int((UIScreen.main.bounds.width - 2*spacing) / (minColWidth + spacing)))
let layout = Array(repeating: col, count: columns)
LazyVGrid(columns: layout, spacing: 10) {
ForEach(hoarder.emojis, id: \.self) { emoji in
if hoarder.downloadedEmojis.contains(emoji.name) {
ZStack {
Rectangle()
.foregroundStyle(isDark ? .black : .white)
EmojiPreview(emoji: emoji)
RoundedRectangle(cornerRadius: 15)
.stroke(.gray, lineWidth: 1)
}
.aspectRatio(1, contentMode: .fit)
.clipShape(RoundedRectangle(cornerRadius: 15))
.contextMenu {
Text(emoji.name)
Button("Share", systemImage: "square.and.arrow.up") {
}
ShareLink("Share", item: emoji.localImageURL, subject: nil, message: nil)
ShareLink("Share", item: emoji.remoteImageURL, subject: nil, message: nil)
Divider()
Button("Delete", systemImage: "trash.fill", role: .destructive) {
hoarder.delete(emoji: emoji)
}
}
}
}
}
.padding(.horizontal, spacing)
}
}
}
#Preview {
DownloadedView()
}
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.