mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-25 08:30:41 +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)
|
scrollToId: $viewModel.scrollToId)
|
||||||
let isFocused = self.viewModel.statusId == status.id
|
let isFocused = self.viewModel.statusId == status.id
|
||||||
|
|
||||||
StatusRowView(viewModel: viewModel)
|
StatusRowView(viewModel: viewModel, context: .detail)
|
||||||
.id(status.id + (status.editedAt?.asDate.description ?? ""))
|
.id(status.id + (status.editedAt?.asDate.description ?? ""))
|
||||||
.environment(\.extraLeadingInset, !isCompact ? extraInsets : 0)
|
.environment(\.extraLeadingInset, !isCompact ? extraInsets : 0)
|
||||||
.environment(\.indentationLevel, !isCompact ? indentationLevel : 0)
|
.environment(\.indentationLevel, !isCompact ? indentationLevel : 0)
|
||||||
|
|
|
@ -23,8 +23,12 @@ public struct StatusRowView: View {
|
||||||
@State private var viewModel: StatusRowViewModel
|
@State private var viewModel: StatusRowViewModel
|
||||||
@State private var showSelectableText: Bool = false
|
@State private var showSelectableText: Bool = false
|
||||||
|
|
||||||
public init(viewModel: StatusRowViewModel) {
|
public enum Context { case timeline, detail }
|
||||||
_viewModel = .init(initialValue: viewModel)
|
private let context: Context
|
||||||
|
|
||||||
|
public init(viewModel: StatusRowViewModel, context: Context = .timeline) {
|
||||||
|
self._viewModel = .init(initialValue: viewModel)
|
||||||
|
self.context = context
|
||||||
}
|
}
|
||||||
|
|
||||||
var contextMenu: some View {
|
var contextMenu: some View {
|
||||||
|
@ -56,7 +60,7 @@ public struct StatusRowView: View {
|
||||||
EmptyView()
|
EmptyView()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if !isCompact {
|
if !isCompact && context != .detail {
|
||||||
Group {
|
Group {
|
||||||
StatusRowTagView(viewModel: viewModel)
|
StatusRowTagView(viewModel: viewModel)
|
||||||
StatusRowReblogView(viewModel: viewModel)
|
StatusRowReblogView(viewModel: viewModel)
|
||||||
|
|
Loading…
Reference in a new issue