mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-06-10 01:09:29 +00:00
More opt
This commit is contained in:
parent
d1d7efda3a
commit
1f73af4822
|
@ -115,11 +115,13 @@ public struct StatusDetailView: View {
|
|||
.environment(\.isStatusFocused, isFocused)
|
||||
.environment(\.isStatusDetailLoaded, isFocused ? !self.viewModel.isLoadingContext : false)
|
||||
.overlay {
|
||||
GeometryReader { reader in
|
||||
VStack {}
|
||||
.onAppear {
|
||||
statusHeight = reader.size.height
|
||||
}
|
||||
if isFocused {
|
||||
GeometryReader { reader in
|
||||
VStack {}
|
||||
.onAppear {
|
||||
statusHeight = reader.size.height
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.id(status.id)
|
||||
|
|
|
@ -99,8 +99,6 @@ public struct StatusRowView: View {
|
|||
|
||||
if isFocused, isStatusDetailLoaded {
|
||||
StatusRowDetailView(viewModel: viewModel)
|
||||
.transition(.move(edge: .bottom))
|
||||
.animation(.snappy, value: isStatusDetailLoaded)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,6 +15,12 @@ import SwiftUI
|
|||
let showActions: Bool
|
||||
let textDisabled: Bool
|
||||
let finalStatus: AnyStatus
|
||||
|
||||
let client: Client
|
||||
let routerPath: RouterPath
|
||||
|
||||
private let theme = Theme.shared
|
||||
private let userMentionned: Bool
|
||||
|
||||
var isPinned: Bool
|
||||
var embeddedStatus: Status?
|
||||
|
@ -26,6 +32,7 @@ import SwiftUI
|
|||
var isLoadingTranslation: Bool = false
|
||||
var showDeleteAlert: Bool = false
|
||||
|
||||
@ObservationIgnored
|
||||
private var actionsAccountsFetched: Bool = false
|
||||
var favoriters: [Account] = []
|
||||
var rebloggers: [Account] = []
|
||||
|
@ -56,10 +63,13 @@ import SwiftUI
|
|||
// number of lines to show, nil means show the whole post
|
||||
var lineLimit: Int?
|
||||
// post length determining if the post should be collapsed
|
||||
@ObservationIgnored
|
||||
let collapseThresholdLength: Int = 750
|
||||
// number of text lines to show on a collpased post
|
||||
@ObservationIgnored
|
||||
let collapsedLines: Int = 8
|
||||
// user preference, set in init
|
||||
@ObservationIgnored
|
||||
var collapseLongPosts: Bool = false
|
||||
|
||||
private func recalcCollapse() {
|
||||
|
@ -72,9 +82,7 @@ import SwiftUI
|
|||
}
|
||||
}
|
||||
|
||||
private let theme = Theme.shared
|
||||
private let userMentionned: Bool
|
||||
|
||||
@ObservationIgnored
|
||||
private var seen = false
|
||||
|
||||
var filter: Filtered? {
|
||||
|
@ -96,9 +104,6 @@ import SwiftUI
|
|||
}
|
||||
}
|
||||
|
||||
let client: Client
|
||||
let routerPath: RouterPath
|
||||
|
||||
public init(status: Status,
|
||||
client: Client,
|
||||
routerPath: RouterPath,
|
||||
|
|
Loading…
Reference in a new issue