mirror of
https://github.com/neon443/StickerSlack.git
synced 2026-11-30 12:44:51 +00:00
fix scroll indicator floating lmao
if 0 emojis are downloaded, it shows up red :pf:
This commit is contained in:
2 files changed
+12
-2
No files matched your search
@@ -52,7 +52,7 @@ class StickerBrowserViewController: MSStickerBrowserViewController {
|
||||
stickerBrowserView.reloadData()
|
||||
guard let subview = stickerBrowserView.subviews.first,
|
||||
let collectionView = subview as? UICollectionView else { return }
|
||||
collectionView.setContentOffset(CGPoint(x: 0, y: 0), animated: true)
|
||||
collectionView.setContentOffset(.zero, animated: true)
|
||||
}
|
||||
|
||||
func setEmptyViewTo(visible: Bool) {
|
||||
@@ -75,6 +75,16 @@ class StickerBrowserViewController: MSStickerBrowserViewController {
|
||||
}
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
guard let subview = stickerBrowserView.subviews.first,
|
||||
let collectionView = subview as? UICollectionView else { return }
|
||||
collectionView.automaticallyAdjustsScrollIndicatorInsets = false
|
||||
collectionView.directionalLayoutMargins.trailing = 0
|
||||
self.view.directionalLayoutMargins.trailing = 0
|
||||
collectionView.verticalScrollIndicatorInsets.bottom = view.safeAreaInsets.bottom
|
||||
}
|
||||
|
||||
override func numberOfStickers(in stickerBrowserView: MSStickerBrowserView) -> Int {
|
||||
return msStickers.count
|
||||
}
|
||||
|
||||