Skip to content

Commit

Permalink
Fix reaction limit
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac committed Aug 12, 2024
1 parent 09da967 commit babdec7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion submodules/BrowserUI/Sources/BrowserDocumentContent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ final class BrowserDocumentContent: UIView, BrowserContent, WKNavigationDelegate
self.updateScrollingOffset(isReset: true, transition: .spring(duration: 0.4))
}

func webView(_ webView: WKWebView, didCommit navigation: WKNavigation!)
func webView(_ webView: WKWebView, didCommit navigation: WKNavigation!) {
self.updateFontState(self.currentFontState, force: true)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1402,6 +1402,9 @@ public class PeerAllowedReactionsScreen: ViewControllerComponentContainer {
case .empty:
isEnabled = false
}
if let starsAllowed = reactionSettings.starsAllowed, starsAllowed {
isEnabled = true
}
}

var missingReactionFiles: [Int64] = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1993,9 +1993,17 @@ private func editingItems(data: PeerInfoScreenData?, state: PeerInfoState, chatL
case .all:
label = presentationData.strings.PeerInfo_LabelAllReactions
case .empty:
label = presentationData.strings.PeerInfo_ReactionsDisabled
if let starsAllowed = reactionSettings.starsAllowed, starsAllowed {
label = "1"
} else {
label = presentationData.strings.PeerInfo_ReactionsDisabled
}
case let .limited(reactions):
label = "\(reactions.count)"
var countValue = reactions.count
if let starsAllowed = reactionSettings.starsAllowed, starsAllowed {
countValue += 1
}
label = "\(countValue)"
}
} else {
label = ""
Expand Down

0 comments on commit babdec7

Please sign in to comment.