got a split sticker picker setup, blank sticker pane tho

added messagesrootviewcontroller for the split pane thingy
added messagespacklistview to select packs n stuff
added .description to packs for easier display
updated stickerdatasource to take a pack for filtering
messagesvc needs to be cleaned
ps i tried a splitviewcontroller but it didnt do the split
This commit is contained in:
Nihaal Sharma committed 2026-07-29 02:04:40 +05:30
1 parent 03d4deaa12
commit 21860a60c1
11 files changed
+252 -18

No files matched your search

@@ -0,0 +1,60 @@
//
// MessagesPackListView.swift
// StickerSlackiMessageApp
//
// Created by neon443 on 24/07/2026.
//
import Foundation
import UIKit
class MessagesPackListView: UITableViewController {
var emojiHoarder: EmojiHoarder!
var onSelect: ((EmojiPack) -> Void)?
init(hoarder: EmojiHoarder) {
self.emojiHoarder = hoarder
super.init(style: .plain)
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func packFor(indexPath: IndexPath) -> EmojiPack? {
guard emojiHoarder.emojiPacks.indices.contains(indexPath.row) else { return nil }
return emojiHoarder.emojiPacks[indexPath.row]
}
override func viewDidLoad() {
// self.splitViewController?.preferredPrimaryColumnWidth = UIScreen.main.bounds.width/4
return
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
}
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return emojiHoarder.emojiPacks.count
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = UITableViewCell()
var config = cell.defaultContentConfiguration()
if let pack = packFor(indexPath: indexPath) {
config.text = pack.name
config.secondaryText = pack.description
config.textProperties.font = UIFont.systemFont(ofSize: 14)
config.secondaryTextProperties.font = UIFont.systemFont(ofSize: 14)
}
cell.contentConfiguration = config
return cell
}
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
onSelect?(emojiHoarder.emojiPacks[indexPath.row])
}
}
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.