Reaction improvements

This commit is contained in:
Ali
2021-12-23 00:34:53 +04:00
parent ccffdb6bac
commit af01ec906f
17 changed files with 230 additions and 55 deletions

View File

@@ -162,6 +162,9 @@ private func peerAllowedReactionListControllerEntries(
entries.append(.itemsHeader("AVAILABLE REACTIONS"))
var index = 0
for availableReaction in availableReactions.reactions {
if !availableReaction.isEnabled {
continue
}
entries.append(.item(index: index, value: availableReaction.value, file: availableReaction.staticIcon, text: availableReaction.title, isEnabled: allowedReactions.contains(availableReaction.value)))
index += 1
}
@@ -217,6 +220,9 @@ public func peerAllowedReactionListController(
if var updatedAllowedReactions = state.updatedAllowedReactions {
if updatedAllowedReactions.isEmpty {
for availableReaction in availableReactions.reactions {
if !availableReaction.isEnabled {
continue
}
updatedAllowedReactions.insert(availableReaction.value)
}
} else {