Never show the empty sticker keyboard.
This commit is contained in:
parent
7068b65364
commit
abce36b687
@ -1105,7 +1105,18 @@ const CGFloat kMaxTextViewHeight = 98;
|
||||
- (void)stickerButtonPressed
|
||||
{
|
||||
OWSLogVerbose(@"");
|
||||
|
||||
|
||||
__block BOOL hasInstalledStickerPacks;
|
||||
[self.databaseStorage readWithBlock:^(SDSAnyReadTransaction *transaction) {
|
||||
hasInstalledStickerPacks = [StickerManager installedStickerPacksWithTransaction:transaction].count > 0;
|
||||
}];
|
||||
if (!hasInstalledStickerPacks) {
|
||||
// If the keyboard is presented and no stickers are installed,
|
||||
// show the manage stickers view. Do not show the sticker keyboard.
|
||||
[self presentManageStickersView];
|
||||
return;
|
||||
}
|
||||
|
||||
[self activateStickerKeyboard];
|
||||
}
|
||||
|
||||
|
||||
@ -102,17 +102,6 @@ public class StickerKeyboard: UIStackView {
|
||||
}
|
||||
|
||||
@objc public func wasPresented() {
|
||||
// If there are no recents, default to showing the first sticker pack.
|
||||
if currentPageCollectionView.stickerCount < 1 {
|
||||
selectedStickerPack = stickerPacks.first
|
||||
|
||||
if selectedStickerPack == nil {
|
||||
// If the keyboard is presented and no stickers are
|
||||
// installed, show the manage stickers view.
|
||||
delegate?.presentManageStickersView()
|
||||
}
|
||||
}
|
||||
|
||||
updatePageConstraints()
|
||||
}
|
||||
|
||||
@ -247,7 +236,7 @@ public class StickerKeyboard: UIStackView {
|
||||
private var stickerPackCollectionViews = [
|
||||
StickerPackCollectionView(),
|
||||
StickerPackCollectionView(),
|
||||
StickerPackCollectionView(),
|
||||
StickerPackCollectionView()
|
||||
]
|
||||
private var stickerPackCollectionViewConstraints = [NSLayoutConstraint]()
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user