TM-SGNL-iOS/SignalUI/Views/BodyRanges/SearchDisplayConfigurations.swift
TeleMessage developers dde0620daf initial commit
2025-05-03 12:28:28 -07:00

17 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
)
}
}