Skip to content

Commit 036b429

Browse files
authored
Show the favorite stickers limit notice only when the list is full (#189)
Adding a sticker to Favorites from a message's context menu compared the limit and the number of favorites the wrong way round, so users without Premium got "Limit of Favorite Stickers Reached" whenever they had 5 favorites or fewer, even none. The check now matches Add GIF, the sticker panel and iOS.
1 parent e8cc588 commit 036b429

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎packages/ChatUI/Sources/ChatUI/ChatMessageMenuItems.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1404,7 +1404,7 @@ public func chatMenuItems(for message: Message, entry: ChatHistoryEntry?, textLa
14041404
thirdBlock.append(ContextMenuItem(!saved ? strings().chatContextAddFavoriteSticker : strings().chatContextRemoveFavoriteSticker, handler: {
14051405
if !saved {
14061406
let limit = context.isPremium ? context.premiumLimits.stickers_faved_limit_premium : context.premiumLimits.stickers_faved_limit_default
1407-
if limit >= data.savedStickersCount, !context.isPremium, !context.premiumIsBlocked {
1407+
if limit <= data.savedStickersCount, !context.isPremium, !context.premiumIsBlocked {
14081408
showModalText(for: context.window, text: strings().chatContextFavoriteStickersLimitInfo("\(context.premiumLimits.stickers_faved_limit_premium)"), title: strings().chatContextFavoriteStickersLimitTitle, callback: { value in
14091409
showPremiumLimit(context: context, type: .faveStickers)
14101410
})

0 commit comments

Comments
 (0)