YAYAYYAAY FIXED THE STUPID STATE ISSUES AND SWITCHING PACKS

updated rootviewcontroller to remove previous trailingvc and add new one
added proper reload function that rebuilds the sticker array
updated the subtitle for packs, slightly smaller and gray font
This commit is contained in:
Nihaal Sharma committed 2026-07-31 00:57:13 +05:30
1 parent 8717504c62
commit 8b87febd30
7 files changed
+61 -255

No files matched your search

@@ -10,13 +10,35 @@ import UIKit
import Messages
class MessagesRootViewController: UIViewController {
let leadingVC: UIViewController
let trailingVC: UIViewController
var emojiHoarder: EmojiHoarder
var leadingVC: MessagesPackListView
var trailingVC: UIViewController
init(leading: UIViewController, trailing: UIViewController) {
self.leadingVC = leading
init(
emojiHoarder: EmojiHoarder,
leading: UIViewController,
trailing: UIViewController
) {
self.emojiHoarder = emojiHoarder
self.leadingVC = MessagesPackListView(hoarder: emojiHoarder)
self.trailingVC = trailing
super.init(nibName: nil, bundle: nil)
leadingVC.onSelect = { pack in
self.trailingVC.view.removeFromSuperview()
self.trailingVC.removeFromParent()
self.trailingVC.didMove(toParent: nil)
self.trailingVC = StickerBrowserViewController(emojiHoarder: emojiHoarder, pack: pack)
self.addChild(self.trailingVC)
self.view.addSubview(self.trailingVC.view)
self.trailingVC.view.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([
self.trailingVC.view.topAnchor.constraint(equalTo: self.view.topAnchor),
self.trailingVC.view.bottomAnchor.constraint(equalTo: self.view.bottomAnchor),
self.trailingVC.view.leadingAnchor.constraint(equalTo: self.leadingVC.view.trailingAnchor),
self.trailingVC.view.trailingAnchor.constraint(equalTo: self.view.trailingAnchor)
])
self.trailingVC.didMove(toParent: self)
}
}
required init?(coder: NSCoder) {
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.