Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios

This commit is contained in:
Ilya Laktyushin
2022-05-18 18:20:03 +04:00
32 changed files with 937 additions and 185 deletions

View File

@@ -51,7 +51,7 @@ func _internal_toggleItemPinned(postbox: Postbox, accountPeerId: PeerId, locatio
}
let count = sameKind.count + additionalCount
if count > limitCount {
if count > limitCount, itemIds.firstIndex(of: itemId) == nil {
return .limitExceeded(count: count, limit: limitCount)
} else {
if let index = itemIds.firstIndex(of: itemId) {