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 {
|
||||
NavigationView2 {
|
||||
// GeometryReader { geo in
|
||||
VStack {
|
||||
Button() {
|
||||
editName.toggle()
|
||||
@@ -231,7 +230,6 @@ struct EmojiPackDetailView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ import SwiftUI
|
||||
|
||||
class PlainEmojiCollectionViewCell: UICollectionViewCell {
|
||||
let stackView = UIStackView()
|
||||
// let spinner = UIActivityIndicatorView()
|
||||
var hostingController: UIHostingController<StickerPreview>?
|
||||
|
||||
override init(frame: CGRect) {
|
||||
@@ -37,19 +36,12 @@ class PlainEmojiCollectionViewCell: UICollectionViewCell {
|
||||
}
|
||||
|
||||
func configureSkeleton() {
|
||||
// spinner.startAnimating()
|
||||
// if spinner.superview == nil {
|
||||
// stackView.addArrangedSubview(spinner)
|
||||
// }
|
||||
}
|
||||
|
||||
func configure(with: EmojiHoarder, emoji: Emoji) {
|
||||
hostingController?.view.removeFromSuperview()
|
||||
let swiftUIView = StickerPreview(sticker: emoji)
|
||||
|
||||
// if let hostingController {
|
||||
// hostingController.rootView = swiftUIView
|
||||
// } else {
|
||||
let hostingController = UIHostingController(rootView: swiftUIView)
|
||||
self.hostingController = hostingController
|
||||
self.stackView.insertArrangedSubview(hostingController.view, at: 0)
|
||||
@@ -58,17 +50,11 @@ class PlainEmojiCollectionViewCell: UICollectionViewCell {
|
||||
NSLayoutConstraint.activate([
|
||||
hostingController.view.heightAnchor.constraint(equalTo: hostingController.view.widthAnchor)
|
||||
])
|
||||
// }
|
||||
}
|
||||
|
||||
override func prepareForReuse() {
|
||||
super.prepareForReuse()
|
||||
|
||||
// stackView.arrangedSubviews.forEach {
|
||||
// stackView.removeArrangedSubview($0)
|
||||
// $0.removeFromSuperview()
|
||||
// }
|
||||
|
||||
hostingController?.view.removeFromSuperview()
|
||||
hostingController = nil
|
||||
|
||||
|
||||