mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Removing dead code part 3 (#2264)
This commit is contained in:
@@ -26,8 +26,6 @@ struct TimelineItemBubbledStylerView<Content: View>: View {
|
||||
let timelineItem: EventBasedTimelineItemProtocol
|
||||
let adjustedDeliveryStatus: TimelineItemDeliveryStatus?
|
||||
@ViewBuilder let content: () -> Content
|
||||
|
||||
@State private var showItemActionMenu = false
|
||||
|
||||
private var isEncryptedOneToOneRoom: Bool { context.viewState.isEncryptedOneToOneRoom }
|
||||
|
||||
|
||||
@@ -24,8 +24,6 @@ struct TimelineItemPlainStylerView<Content: View>: View {
|
||||
let timelineItem: EventBasedTimelineItemProtocol
|
||||
let adjustedDeliveryStatus: TimelineItemDeliveryStatus?
|
||||
@ViewBuilder let content: () -> Content
|
||||
|
||||
@State private var showItemActionMenu = false
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .trailing, spacing: 0) {
|
||||
|
||||
@@ -68,10 +68,6 @@ private struct TimelineGroupStyleKey: EnvironmentKey {
|
||||
static let defaultValue = TimelineGroupStyle.single
|
||||
}
|
||||
|
||||
private struct ReadReceiptsEnabledKey: EnvironmentKey {
|
||||
static let defaultValue = false
|
||||
}
|
||||
|
||||
extension EnvironmentValues {
|
||||
var timelineStyle: TimelineStyle {
|
||||
get { self[TimelineStyleKey.self] }
|
||||
|
||||
@@ -18,8 +18,6 @@ import SwiftUI
|
||||
|
||||
@MainActor
|
||||
struct TimelineReactionsView: View {
|
||||
private static let horizontalSpacing: CGFloat = 4
|
||||
private static let verticalSpacing: CGFloat = 4
|
||||
private let feedbackGenerator = UIImpactFeedbackGenerator(style: .heavy)
|
||||
@Environment(\.layoutDirection) private var layoutDirection: LayoutDirection
|
||||
|
||||
|
||||
@@ -20,8 +20,6 @@ struct PollRoomTimelineView: View {
|
||||
let timelineItem: PollRoomTimelineItem
|
||||
@EnvironmentObject private var context: RoomScreenViewModel.Context
|
||||
|
||||
private let feedbackGenerator = UIImpactFeedbackGenerator(style: .heavy)
|
||||
|
||||
var body: some View {
|
||||
TimelineStyler(timelineItem: timelineItem) {
|
||||
PollView(poll: poll, editable: timelineItem.isEditable) { action in
|
||||
|
||||
@@ -24,6 +24,7 @@ import OrderedCollections
|
||||
class TimelineItemCell: UITableViewCell {
|
||||
static let reuseIdentifier = "TimelineItemCell"
|
||||
|
||||
// periphery:ignore - retaining purpose
|
||||
var item: RoomTimelineItemViewState?
|
||||
|
||||
override func prepareForReuse() {
|
||||
@@ -63,8 +64,6 @@ class TimelineTableViewController: UIViewController {
|
||||
paginateBackwardsPublisher.send(())
|
||||
}
|
||||
}
|
||||
|
||||
var contextMenuActionProvider: (@MainActor (_ itemID: TimelineItemIdentifier) -> TimelineItemMenuActions?)?
|
||||
|
||||
@Binding private var isScrolledToBottom: Bool
|
||||
|
||||
|
||||
@@ -66,9 +66,6 @@ struct UITimelineView: UIViewControllerRepresentable {
|
||||
if tableViewController.isBackPaginating != context.viewState.timelineViewState.isBackPaginating {
|
||||
tableViewController.isBackPaginating = context.viewState.timelineViewState.isBackPaginating
|
||||
}
|
||||
|
||||
// Doesn't have an equatable conformance :(
|
||||
tableViewController.contextMenuActionProvider = context.viewState.timelineItemMenuActionProvider
|
||||
}
|
||||
|
||||
func send(viewAction: RoomScreenViewAction) {
|
||||
|
||||
@@ -133,7 +133,7 @@ extension RoomTimelineItemProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
public struct TimelineItemMenu: View {
|
||||
struct TimelineItemMenu: View {
|
||||
@EnvironmentObject private var context: RoomScreenViewModel.Context
|
||||
@Environment(\.dismiss) private var dismiss
|
||||
|
||||
@@ -141,7 +141,7 @@ public struct TimelineItemMenu: View {
|
||||
let actions: TimelineItemMenuActions
|
||||
private let feedbackGenerator = UIImpactFeedbackGenerator(style: .heavy)
|
||||
|
||||
public var body: some View {
|
||||
var body: some View {
|
||||
VStack(spacing: 8) {
|
||||
header
|
||||
.frame(idealWidth: 300.0)
|
||||
|
||||
Reference in New Issue
Block a user