UI: bold entire message text for self in mesh, DM, and geohash; adjust caching to include self flag

This commit is contained in:
jack
2025-08-21 02:51:14 +02:00
parent 222854c60a
commit c63350a4d3
2 changed files with 33 additions and 12 deletions
+4 -4
View File
@@ -410,12 +410,12 @@ class BitchatMessage: Codable {
// Cached formatted text (not included in Codable)
private var _cachedFormattedText: [String: AttributedString] = [:]
func getCachedFormattedText(isDark: Bool) -> AttributedString? {
return _cachedFormattedText["\(isDark)"]
func getCachedFormattedText(isDark: Bool, isSelf: Bool) -> AttributedString? {
return _cachedFormattedText["\(isDark)-\(isSelf)"]
}
func setCachedFormattedText(_ text: AttributedString, isDark: Bool) {
_cachedFormattedText["\(isDark)"] = text
func setCachedFormattedText(_ text: AttributedString, isDark: Bool, isSelf: Bool) {
_cachedFormattedText["\(isDark)-\(isSelf)"] = text
}
// Codable implementation