Signal-iOS/SignalUI/Views/BodyRanges/SearchDisplayConfigurations.swift
2024-09-29 20:03:17 -05:00

18 lines
525 B
Swift

//
// Copyright 2023 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
//
public import SignalServiceKit
extension HydratedMessageBody.DisplayConfiguration.SearchRanges {
public static func matchedRanges(_ ranges: [NSRange]) -> Self {
return HydratedMessageBody.DisplayConfiguration.SearchRanges(
matchingBackgroundColor: .fixed(ConversationStyle.searchMatchHighlightColor),
matchingForegroundColor: .fixed(.ows_black),
matchedRanges: ranges
)
}
}