mirror of
https://github.com/neon443/StickerSlack.git
synced 2026-11-30 20:54:51 +00:00
indents and cleanup
This commit is contained in:
2 files changed
-16
No files matched your search
@@ -43,7 +43,6 @@ struct EmojiPackDetailView: View {
|
|||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
NavigationView2 {
|
NavigationView2 {
|
||||||
// GeometryReader { geo in
|
|
||||||
VStack {
|
VStack {
|
||||||
Button() {
|
Button() {
|
||||||
editName.toggle()
|
editName.toggle()
|
||||||
@@ -231,7 +230,6 @@ struct EmojiPackDetailView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import SwiftUI
|
|||||||
|
|
||||||
class PlainEmojiCollectionViewCell: UICollectionViewCell {
|
class PlainEmojiCollectionViewCell: UICollectionViewCell {
|
||||||
let stackView = UIStackView()
|
let stackView = UIStackView()
|
||||||
// let spinner = UIActivityIndicatorView()
|
|
||||||
var hostingController: UIHostingController<StickerPreview>?
|
var hostingController: UIHostingController<StickerPreview>?
|
||||||
|
|
||||||
override init(frame: CGRect) {
|
override init(frame: CGRect) {
|
||||||
@@ -37,19 +36,12 @@ class PlainEmojiCollectionViewCell: UICollectionViewCell {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func configureSkeleton() {
|
func configureSkeleton() {
|
||||||
// spinner.startAnimating()
|
|
||||||
// if spinner.superview == nil {
|
|
||||||
// stackView.addArrangedSubview(spinner)
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func configure(with: EmojiHoarder, emoji: Emoji) {
|
func configure(with: EmojiHoarder, emoji: Emoji) {
|
||||||
hostingController?.view.removeFromSuperview()
|
hostingController?.view.removeFromSuperview()
|
||||||
let swiftUIView = StickerPreview(sticker: emoji)
|
let swiftUIView = StickerPreview(sticker: emoji)
|
||||||
|
|
||||||
// if let hostingController {
|
|
||||||
// hostingController.rootView = swiftUIView
|
|
||||||
// } else {
|
|
||||||
let hostingController = UIHostingController(rootView: swiftUIView)
|
let hostingController = UIHostingController(rootView: swiftUIView)
|
||||||
self.hostingController = hostingController
|
self.hostingController = hostingController
|
||||||
self.stackView.insertArrangedSubview(hostingController.view, at: 0)
|
self.stackView.insertArrangedSubview(hostingController.view, at: 0)
|
||||||
@@ -58,17 +50,11 @@ class PlainEmojiCollectionViewCell: UICollectionViewCell {
|
|||||||
NSLayoutConstraint.activate([
|
NSLayoutConstraint.activate([
|
||||||
hostingController.view.heightAnchor.constraint(equalTo: hostingController.view.widthAnchor)
|
hostingController.view.heightAnchor.constraint(equalTo: hostingController.view.widthAnchor)
|
||||||
])
|
])
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override func prepareForReuse() {
|
override func prepareForReuse() {
|
||||||
super.prepareForReuse()
|
super.prepareForReuse()
|
||||||
|
|
||||||
// stackView.arrangedSubviews.forEach {
|
|
||||||
// stackView.removeArrangedSubview($0)
|
|
||||||
// $0.removeFromSuperview()
|
|
||||||
// }
|
|
||||||
|
|
||||||
hostingController?.view.removeFromSuperview()
|
hostingController?.view.removeFromSuperview()
|
||||||
hostingController = nil
|
hostingController = nil
|
||||||
|
|
||||||
|
|||||||