mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Update files following swiftformat upgrade
This commit is contained in:
committed by
Stefan Ceriu
parent
fe189fcfed
commit
23062901c0
@@ -47,7 +47,7 @@ struct GeoURI: Hashable {
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
// Parse a geo URI string like "geo:53.99803101552848,-8.25347900390625;u=10"
|
||||
/// Parse a geo URI string like "geo:53.99803101552848,-8.25347900390625;u=10"
|
||||
private static func parseGeoURI(from string: String) -> GeoURI? {
|
||||
guard
|
||||
let matchOutput = try? RegexGeoURI.standard.wholeMatch(in: string)?.output,
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
import MatrixRustSDK
|
||||
import WysiwygComposer
|
||||
|
||||
|
||||
@@ -21,7 +21,10 @@ class MockTimelineController: TimelineControllerProtocol {
|
||||
var roomProxy: JoinedRoomProxyProtocol?
|
||||
var timelineProxy: TimelineProxyProtocol?
|
||||
|
||||
var roomID: String { roomProxy?.id ?? "MockRoomIdentifier" }
|
||||
var roomID: String {
|
||||
roomProxy?.id ?? "MockRoomIdentifier"
|
||||
}
|
||||
|
||||
var timelineKind: TimelineKind
|
||||
|
||||
let callbacks = PassthroughSubject<TimelineControllerCallback, Never>()
|
||||
|
||||
@@ -250,8 +250,8 @@ class TimelineController: TimelineControllerProtocol {
|
||||
await activeTimeline.messageEventContent(for: timelineItemID)
|
||||
}
|
||||
|
||||
// Handle this parallel to the timeline items so we're not forced
|
||||
// to bundle the Rust side objects within them
|
||||
/// Handle this parallel to the timeline items so we're not forced
|
||||
/// to bundle the Rust side objects within them
|
||||
func debugInfo(for itemID: TimelineItemIdentifier) -> TimelineItemDebugInfo {
|
||||
for timelineItemProxy in activeTimelineItemProvider.itemProxies {
|
||||
switch timelineItemProxy {
|
||||
@@ -428,14 +428,12 @@ class TimelineController: TimelineControllerProtocol {
|
||||
let isLastItem = index == collapsibleChunks.indices.last
|
||||
|
||||
let items = collapsibleChunk.compactMap { itemProxy in
|
||||
let timelineItem = self.buildTimelineItem(for: itemProxy,
|
||||
isDM: isDM,
|
||||
hasPredecessor: hasPredecessor,
|
||||
roomDisplayName: displayName,
|
||||
timelineItemFactory: timelineItemFactory,
|
||||
activeTimeline: activeTimeline)
|
||||
|
||||
return timelineItem
|
||||
self.buildTimelineItem(for: itemProxy,
|
||||
isDM: isDM,
|
||||
hasPredecessor: hasPredecessor,
|
||||
roomDisplayName: displayName,
|
||||
timelineItemFactory: timelineItemFactory,
|
||||
activeTimeline: activeTimeline)
|
||||
}
|
||||
|
||||
if items.isEmpty {
|
||||
|
||||
@@ -14,5 +14,7 @@ struct ReadReceipt: Hashable {
|
||||
}
|
||||
|
||||
extension ReadReceipt: Identifiable {
|
||||
var id: String { userID }
|
||||
var id: String {
|
||||
userID
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -10,11 +10,11 @@ import Foundation
|
||||
|
||||
/// Properties of a matrix event that are common between all timeline items.
|
||||
struct RoomTimelineItemProperties: Hashable {
|
||||
// Information on the item this one replying to
|
||||
/// Information on the item this one replying to
|
||||
var replyDetails: TimelineItemReplyDetails?
|
||||
// Whether it's part of a thread or not
|
||||
/// Whether it's part of a thread or not
|
||||
var isThreaded = false
|
||||
// Information about the thread this message is the root of, if any
|
||||
/// Information about the thread this message is the root of, if any
|
||||
var threadSummary: TimelineItemThreadSummary?
|
||||
/// Whether the item has been edited.
|
||||
var isEdited = false
|
||||
|
||||
@@ -624,7 +624,7 @@ struct RoomTimelineItemFactory: RoomTimelineItemFactoryProtocol {
|
||||
return .init(body: messageContent.body, formattedBody: formattedBody, formattedBodyHTMLString: htmlBody)
|
||||
}
|
||||
|
||||
// This fixes the issue of the name not belonging to the first <p> defined paragraph
|
||||
/// This fixes the issue of the name not belonging to the first <p> defined paragraph
|
||||
private func buildEmoteFormattedBodyFromHTML(html: String, name: String) -> AttributedString? {
|
||||
let htmlBodyPlaceholder = "{htmlBodyPlaceholder}"
|
||||
var finalString = AttributedString(L10n.commonEmote(name, htmlBodyPlaceholder))
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
import MatrixRustSDK
|
||||
|
||||
protocol RoomTimelineItemFactoryProtocol {
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
//
|
||||
import OrderedCollections
|
||||
|
||||
// Copyright 2025 Element Creations Ltd.
|
||||
// Copyright 2022-2025 New Vector Ltd.
|
||||
//
|
||||
@@ -7,8 +9,6 @@
|
||||
//
|
||||
import SwiftUI
|
||||
|
||||
import OrderedCollections
|
||||
|
||||
struct RoomTimelineItemView: View {
|
||||
@Environment(\.timelineContext) var context
|
||||
@ObservedObject var viewState: RoomTimelineItemViewState
|
||||
|
||||
Reference in New Issue
Block a user