mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-25 00:20:45 +00:00
hide context indicator for statuses inside StatusDetailView
(#1899)
This commit is contained in:
parent
e03747aa45
commit
76a8f45478
2 changed files with 8 additions and 4 deletions
|
@ -123,7 +123,7 @@ public struct StatusDetailView: View {
|
|||
scrollToId: $viewModel.scrollToId)
|
||||
let isFocused = self.viewModel.statusId == status.id
|
||||
|
||||
StatusRowView(viewModel: viewModel)
|
||||
StatusRowView(viewModel: viewModel, context: .detail)
|
||||
.id(status.id + (status.editedAt?.asDate.description ?? ""))
|
||||
.environment(\.extraLeadingInset, !isCompact ? extraInsets : 0)
|
||||
.environment(\.indentationLevel, !isCompact ? indentationLevel : 0)
|
||||
|
|
|
@ -23,8 +23,12 @@ public struct StatusRowView: View {
|
|||
@State private var viewModel: StatusRowViewModel
|
||||
@State private var showSelectableText: Bool = false
|
||||
|
||||
public init(viewModel: StatusRowViewModel) {
|
||||
_viewModel = .init(initialValue: viewModel)
|
||||
public enum Context { case timeline, detail }
|
||||
private let context: Context
|
||||
|
||||
public init(viewModel: StatusRowViewModel, context: Context = .timeline) {
|
||||
self._viewModel = .init(initialValue: viewModel)
|
||||
self.context = context
|
||||
}
|
||||
|
||||
var contextMenu: some View {
|
||||
|
@ -56,7 +60,7 @@ public struct StatusRowView: View {
|
|||
EmptyView()
|
||||
}
|
||||
} else {
|
||||
if !isCompact {
|
||||
if !isCompact && context != .detail {
|
||||
Group {
|
||||
StatusRowTagView(viewModel: viewModel)
|
||||
StatusRowReblogView(viewModel: viewModel)
|
||||
|
|
Loading…
Reference in a new issue