mirror of
https://github.com/element-hq/element-x-ios.git
synced 2025-03-10 21:39:12 +00:00
Expand all sections on the view source screen by default. (#2203)
This commit is contained in:
parent
b1371f7f47
commit
a99aee7a9a
@ -228,7 +228,7 @@ class RoomScreenInteractionHandler {
|
|||||||
actionsSubject.send(.displayMessageForwarding(itemID: itemID))
|
actionsSubject.send(.displayMessageForwarding(itemID: itemID))
|
||||||
case .viewSource:
|
case .viewSource:
|
||||||
let debugInfo = timelineController.debugInfo(for: eventTimelineItem.id)
|
let debugInfo = timelineController.debugInfo(for: eventTimelineItem.id)
|
||||||
MXLog.info(debugInfo)
|
MXLog.info("Showing debug info for \(eventTimelineItem.id)")
|
||||||
actionsSubject.send(.showDebugInfo(debugInfo))
|
actionsSubject.send(.showDebugInfo(debugInfo))
|
||||||
case .retryDecryption(let sessionID):
|
case .retryDecryption(let sessionID):
|
||||||
Task {
|
Task {
|
||||||
|
@ -25,7 +25,7 @@ struct TimelineItemDebugView: View {
|
|||||||
NavigationStack {
|
NavigationStack {
|
||||||
ScrollView {
|
ScrollView {
|
||||||
VStack(spacing: 8) {
|
VStack(spacing: 8) {
|
||||||
TimelineItemInfoDisclosureGroup(title: "Model", text: info.model, isInitiallyExpanded: true)
|
TimelineItemInfoDisclosureGroup(title: "Model", text: info.model)
|
||||||
|
|
||||||
if let originalJSONInfo = info.originalJSON {
|
if let originalJSONInfo = info.originalJSON {
|
||||||
TimelineItemInfoDisclosureGroup(title: "Original JSON", text: originalJSONInfo)
|
TimelineItemInfoDisclosureGroup(title: "Original JSON", text: originalJSONInfo)
|
||||||
@ -58,17 +58,11 @@ struct TimelineItemDebugView: View {
|
|||||||
// MARK: - Private
|
// MARK: - Private
|
||||||
|
|
||||||
private struct TimelineItemInfoDisclosureGroup: View {
|
private struct TimelineItemInfoDisclosureGroup: View {
|
||||||
@State private var isExpanded: Bool
|
@State private var isExpanded = true
|
||||||
|
|
||||||
let title: String
|
let title: String
|
||||||
let text: String
|
let text: String
|
||||||
|
|
||||||
init(title: String, text: String, isInitiallyExpanded: Bool = false) {
|
|
||||||
self.title = title
|
|
||||||
self.text = text
|
|
||||||
isExpanded = isInitiallyExpanded
|
|
||||||
}
|
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack(spacing: 0.0) {
|
VStack(spacing: 0.0) {
|
||||||
DisclosureGroup(title, isExpanded: $isExpanded) {
|
DisclosureGroup(title, isExpanded: $isExpanded) {
|
||||||
|
BIN
UnitTests/__Snapshots__/PreviewTests/test_timelineItemDebugView.1.png
(Stored with Git LFS)
BIN
UnitTests/__Snapshots__/PreviewTests/test_timelineItemDebugView.1.png
(Stored with Git LFS)
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user