You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/developer/DeveloperSettingsEvents.kt
Copy file name to clipboardExpand all lines: features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/developer/DeveloperSettingsPresenter.kt
Copy file name to clipboardExpand all lines: features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/developer/DeveloperSettingsState.kt
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,12 @@ data class DeveloperSettingsState(
23
23
// The embedded Neutrino homeserver's federation server_name (its node id), or
24
24
// null until the server has started and resolved its identity.
25
25
valneutrinoServerName:String?,
26
+
// Whether a federation pcap capture is currently running (drives the toggle).
27
+
valneutrinoCapturing:Boolean,
28
+
// A human-readable status line for the capture toggle: where it is writing
29
+
// while on, where the file was saved after stopping, or the failure reason.
30
+
// Null before the toggle has been used this session.
31
+
valneutrinoCaptureStatus:String?,
26
32
valeventSink: (DeveloperSettingsEvents) ->Unit
27
33
) {
28
34
val showLoader = clearCacheAction isAsyncAction.Loading
Copy file name to clipboardExpand all lines: features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/developer/DeveloperSettingsStateProvider.kt
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,10 @@ open class DeveloperSettingsStateProvider : PreviewParameterProvider<DeveloperSe
31
31
// at io.mhssn.colorpicker.pickers.ClassicColorPickerKt$ClassicColorPicker$1$1.invokeSuspend(ClassicColorPicker.kt:53)
32
32
showColorPicker =false,
33
33
),
34
+
aDeveloperSettingsState(
35
+
neutrinoCapturing =true,
36
+
neutrinoCaptureStatus ="Capturing… saved to Downloads on stop",
Copy file name to clipboardExpand all lines: features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/developer/DeveloperSettingsView.kt
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -81,6 +81,18 @@ fun DeveloperSettingsView(
81
81
},
82
82
onClick = onNeutrinoPeersClick,
83
83
)
84
+
ListItem(
85
+
headlineContent = {
86
+
Text("Capture federation traffic")
87
+
},
88
+
supportingContent = state.neutrinoCaptureStatus?.let { status ->
Copy file name to clipboardExpand all lines: features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/developer/DeveloperSettingsPresenterTest.kt
Copy file name to clipboardExpand all lines: features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/developer/FakeNeutrinoService.kt
0 commit comments