From 0b50400598a0884a36242344b4b590a6cc410f53 Mon Sep 17 00:00:00 2001 From: neon443 <69979447+neon443@users.noreply.github.com> Date: Tue, 14 Apr 2026 22:47:01 +0100 Subject: [PATCH] ui updates --- StickerSlack/Extensions/TestStructures.swift | 60 +++++++++---------- .../EmojiPacks/EmojiPackDetailView.swift | 10 ++-- StickerSlack/SwiftUI/Misc/ViewModifiers.swift | 23 +++++++ 3 files changed, 57 insertions(+), 36 deletions(-) diff --git a/StickerSlack/Extensions/TestStructures.swift b/StickerSlack/Extensions/TestStructures.swift index 9f85561..b3c358c 100644 --- a/StickerSlack/Extensions/TestStructures.swift +++ b/StickerSlack/Extensions/TestStructures.swift @@ -134,36 +134,36 @@ extension EmojiPack { "loll", "bleh", "uhh", - "communist" -// "communist", -// "ufahh", -// "uhafh", -// "uhgfh", -// "uoohh", -// "ujyhgghh", -// "uhfgh", -// "ujg3thh", -// "uyhh", -// "ughhhh", -// "uvhh", -// "ujrg3tjthhg", -// "ujherh", -// "uxhggrh", -// "ushgrq3geallh", -// "u hrgqh", -// "ujjjjjyhgh", -// "uherhh", -// "uhhesh", -// "hhreruhgh", -// "u hffh", -// "uh h", -// "uaugerhh", -// "u4h3h", -// "u4hh", -// "ueyhh ", -// "u erthh", -// "uhujh", -// "ujkkkkhh" +// "communist" + "communist", + "ufahh", + "uhafh", + "uhgfh", + "uoohh", + "ujyhgghh", + "uhfgh", + "ujg3thh", + "uyhh", + "ughhhh", + "uvhh", + "ujrg3tjthhg", + "ujherh", + "uxhggrh", + "ushgrq3geallh", + "u hrgqh", + "ujjjjjyhgh", + "uherhh", + "uhhesh", + "hhreruhgh", + "u hffh", + "uh h", + "uaugerhh", + "u4h3h", + "u4hh", + "ueyhh ", + "u erthh", + "uhujh", + "ujkkkkhh" ] ) } diff --git a/StickerSlack/SwiftUI/EmojiPacks/EmojiPackDetailView.swift b/StickerSlack/SwiftUI/EmojiPacks/EmojiPackDetailView.swift index 206efed..1e393b0 100644 --- a/StickerSlack/SwiftUI/EmojiPacks/EmojiPackDetailView.swift +++ b/StickerSlack/SwiftUI/EmojiPacks/EmojiPackDetailView.swift @@ -167,18 +167,16 @@ struct EmojiPackDetailView: View { } .animation(.spring, value: pack.items) .padding() - .padding(.bottom, 32) - } - .transition(.scale) - .navigationTitle(edit ? "Editing" : "Pack Details") - .navigationBarTitleDisplayMode(.inline) - .overlay(alignment: .bottom) { + Text("\(pack.items.count) Emoji\(pack.items.count.plural)") .bold() .multilineTextAlignment(.center) .shadow(radius: 5) .padding(.bottom) } + .transition(.scale) + .navigationTitle(edit ? "Editing" : "Pack Details") + .navigationBarTitleDisplayMode(.inline) .onDisappear { hoarder.saveEmojiPacks() } diff --git a/StickerSlack/SwiftUI/Misc/ViewModifiers.swift b/StickerSlack/SwiftUI/Misc/ViewModifiers.swift index e173759..a40d37a 100644 --- a/StickerSlack/SwiftUI/Misc/ViewModifiers.swift +++ b/StickerSlack/SwiftUI/Misc/ViewModifiers.swift @@ -119,3 +119,26 @@ struct ScrollContentBackgroundHidden: ViewModifier { } } } + +struct TabViewBottomAcceessorySafe: ViewModifier { + var isEnabled: Bool + @ViewBuilder var contents: () -> T + + func body(content: Content) -> some View where Content: View { + if #available(iOS 26.1, *) { + content + .tabViewBottomAccessory(isEnabled: isEnabled, content: contents) + } else { + content + } + } +} + +extension View { + func tabViewBottomAccessorySafe( + isEnabled: Bool = true, + @ViewBuilder content: @escaping () -> Content + ) -> some View { + modifier(TabViewBottomAcceessorySafe(isEnabled: isEnabled, contents: content)) + } +}