IceCubesApp/Packages/Models/Sources/Models/Filter.swift
Chris Kolbu 7391c12644
Accessibility fix for Timeline StatusRowView and Status detail (#1355)
* Add StatusRowView accessibility action to open media attachment viewer

Previously, there would be no way to open QuickLook from the timeline.

Now, we add a custom accessibility action to do this.

* Work around initial accessibility focus bug in StatusDetailView

Previously, (due to identity issues?) the focus would be set on the header view. However, moving to the next element in the focus order. would skip over a random number of elements, depending on the context of the detail view.

Now, we manually set the focus once, allowing the focus order to work as intended.

* Respect filters in Timeline combined accessibility label

* Add explicit action to show filtered warnings from `filterView`

---------

Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
2023-04-04 08:12:25 +02:00

28 lines
659 B
Swift

import Foundation
public struct Filtered: Codable, Equatable, Hashable {
public let filter: Filter
public let keywordMatches: [String]?
}
public struct Filter: Codable, Identifiable, Equatable, Hashable {
public enum Action: String, Codable, Equatable {
case warn, hide
}
public enum Context: String, Codable {
case home, notifications, account, thread
case pub = "public"
}
public let id: String
public let title: String
public let context: [String]
public let filterAction: Action
}
extension Filtered: Sendable {}
extension Filter: Sendable {}
extension Filter.Action: Sendable {}
extension Filter.Context: Sendable {}