Skip to content

Commit c9fab2b

Browse files
SttApolloStypox
authored andcommitted
Add ErrorPanelPreview
1 parent ca16fd2 commit c9fab2b

File tree

1 file changed

+8
-1
lines changed
  • app/src/main/java/org/schabi/newpipe/ui/components/common

1 file changed

+8
-1
lines changed

app/src/main/java/org/schabi/newpipe/ui/components/common/ErrorPanel.kt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ fun ErrorPanel(
5959

6060
Column(
6161
horizontalAlignment = Alignment.CenterHorizontally,
62-
62+
modifier = modifier
6363
) {
6464

6565
Text(
@@ -126,5 +126,12 @@ fun ErrorPanel(
126126
@Composable
127127
fun ErrorPanelPreview() {
128128
AppTheme {
129+
ErrorPanel(
130+
errorInfo = ErrorInfo(
131+
throwable = Exception("Network error"),
132+
userAction = org.schabi.newpipe.error.UserAction.UI_ERROR,
133+
request = "Preview request"
134+
)
135+
)
129136
}
130137
}

0 commit comments

Comments
 (0)