Various improvements

This commit is contained in:
Ilya Laktyushin
2022-05-19 21:15:31 +04:00
parent b0cb39b8cd
commit 3fb304bd6f
30 changed files with 319 additions and 136 deletions

View File

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