Stacktrace in error dialog is hidden by default
This commit is contained in:
parent
f2df70124b
commit
995a29db52
@ -15,6 +15,7 @@ import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.jetpackduba.gitnuro.AppIcons
|
||||
import com.jetpackduba.gitnuro.extensions.handOnHover
|
||||
import com.jetpackduba.gitnuro.extensions.onDoubleClick
|
||||
import com.jetpackduba.gitnuro.managers.Error
|
||||
import com.jetpackduba.gitnuro.theme.secondarySurface
|
||||
import com.jetpackduba.gitnuro.ui.components.PrimaryButton
|
||||
@ -29,6 +30,7 @@ fun ErrorDialog(
|
||||
val horizontalScroll = rememberScrollState()
|
||||
val verticalScroll = rememberScrollState()
|
||||
val clipboard = LocalClipboardManager.current
|
||||
var showStackTrace by remember { mutableStateOf(false) }
|
||||
|
||||
MaterialDialog {
|
||||
Column(
|
||||
@ -50,6 +52,9 @@ fun ErrorDialog(
|
||||
contentDescription = null,
|
||||
tint = MaterialTheme.colors.error,
|
||||
modifier = Modifier.size(24.dp)
|
||||
.onDoubleClick {
|
||||
showStackTrace = !showStackTrace
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
@ -62,6 +67,7 @@ fun ErrorDialog(
|
||||
style = MaterialTheme.typography.body2,
|
||||
)
|
||||
|
||||
if (showStackTrace) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.padding(top = 24.dp)
|
||||
@ -117,6 +123,7 @@ fun ErrorDialog(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Row(
|
||||
modifier = Modifier
|
||||
|
Loading…
Reference in New Issue
Block a user