mirror of
https://github.com/neon443/StickerSlack.git
synced 2026-11-30 12:44:51 +00:00
scroll to top when shuffling
This commit is contained in:
2 files changed
+11
No files matched your search
@@ -53,6 +53,15 @@ class BrowseViewController: UINavigationController {
|
||||
}
|
||||
|
||||
@objc func shuffle() {
|
||||
guard let tableView = self.tableView.tableView else { return }
|
||||
let safeAreaInsets = tableView.safeAreaInsets
|
||||
tableView.setContentOffset(
|
||||
CGPoint(
|
||||
x: CGFloat(-safeAreaInsets.left),
|
||||
y: CGFloat(-safeAreaInsets.top)
|
||||
),
|
||||
animated: true
|
||||
)
|
||||
self.refreshUI(withItems: getItems().shuffled())
|
||||
}
|
||||
}
|
||||
@@ -79,6 +79,8 @@ final class EmojiTableView: UITableViewController {
|
||||
guard let emoji = hoarder.trie.dict[itemIdentifier] else { return cell }
|
||||
|
||||
cell.configure(with: hoarder, emoji: emoji)
|
||||
tableView.separatorInset = UIEdgeInsets(top: 0, left: cell.bounds.height + 8, bottom: 0, right: 16)
|
||||
|
||||
return cell
|
||||
}
|
||||
|
||||
|
||||