remove code related to the previous bidi usage implementation of whitespaces for the timestamp label

This commit is contained in:
Mauro Romito
2026-05-11 16:58:25 +02:00
committed by Mauro
parent 2582293c06
commit deac31e48d
5 changed files with 0 additions and 132 deletions
@@ -1,22 +0,0 @@
//
// Copyright 2025 Element Creations Ltd.
// Copyright 2023-2025 New Vector Ltd.
//
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
// Please see LICENSE files in the repository root for full details.
//
import SwiftUI
extension LayoutDirection {
var isolateLayoutUnicodeString: String {
switch self {
case .leftToRight:
return "\u{2066}"
case .rightToLeft:
return "\u{2067}"
default:
return ""
}
}
}
@@ -41,22 +41,6 @@ extension String {
}
}
extension String {
static func generateBreakableWhitespaceEnd(whitespaceCount: Int, layoutDirection: LayoutDirection) -> String {
guard whitespaceCount > 0 else {
return ""
}
var whiteSpaces = layoutDirection.isolateLayoutUnicodeString
// fixed size whitespace of size 1/3 em per character
whiteSpaces += String(repeating: "\u{2004}", count: whitespaceCount)
// braille whitespace, which is non breakable but makes previous whitespaces breakable
return whiteSpaces + "\u{2800}"
}
}
extension String {
func ellipsize(length: Int) -> String {
guard count > length else {