mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-21 20:47:03 -05:00
parent
ea33f8dba5
commit
fed914827a
2 changed files with 13 additions and 2 deletions
|
@ -4,9 +4,13 @@ import androidx.compose.foundation.background
|
||||||
import androidx.compose.foundation.layout.Arrangement
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
import androidx.compose.foundation.layout.Box
|
import androidx.compose.foundation.layout.Box
|
||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
|
import androidx.compose.foundation.layout.WindowInsets
|
||||||
|
import androidx.compose.foundation.layout.asPaddingValues
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
|
import androidx.compose.foundation.layout.systemBars
|
||||||
import androidx.compose.foundation.rememberScrollState
|
import androidx.compose.foundation.rememberScrollState
|
||||||
import androidx.compose.foundation.verticalScroll
|
import androidx.compose.foundation.verticalScroll
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
|
@ -42,11 +46,13 @@ fun CrashScreen(
|
||||||
val scope = rememberCoroutineScope()
|
val scope = rememberCoroutineScope()
|
||||||
val context = LocalContext.current
|
val context = LocalContext.current
|
||||||
Scaffold(
|
Scaffold(
|
||||||
|
contentWindowInsets = WindowInsets.systemBars,
|
||||||
bottomBar = {
|
bottomBar = {
|
||||||
val strokeWidth = Dp.Hairline
|
val strokeWidth = Dp.Hairline
|
||||||
val borderColor = MaterialTheme.colorScheme.outline
|
val borderColor = MaterialTheme.colorScheme.outline
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
|
.background(MaterialTheme.colorScheme.surface)
|
||||||
.drawBehind {
|
.drawBehind {
|
||||||
drawLine(
|
drawLine(
|
||||||
borderColor,
|
borderColor,
|
||||||
|
@ -55,6 +61,7 @@ fun CrashScreen(
|
||||||
strokeWidth.value,
|
strokeWidth.value,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
.padding(WindowInsets.navigationBars.asPaddingValues())
|
||||||
.padding(horizontal = horizontalPadding, vertical = verticalPadding),
|
.padding(horizontal = horizontalPadding, vertical = verticalPadding),
|
||||||
verticalArrangement = Arrangement.spacedBy(verticalPadding),
|
verticalArrangement = Arrangement.spacedBy(verticalPadding),
|
||||||
) {
|
) {
|
||||||
|
@ -79,10 +86,10 @@ fun CrashScreen(
|
||||||
) { paddingValues ->
|
) { paddingValues ->
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
|
.verticalScroll(rememberScrollState())
|
||||||
.padding(paddingValues)
|
.padding(paddingValues)
|
||||||
.padding(top = 56.dp)
|
.padding(top = 56.dp)
|
||||||
.padding(horizontal = horizontalPadding)
|
.padding(horizontal = horizontalPadding),
|
||||||
.verticalScroll(rememberScrollState()),
|
|
||||||
horizontalAlignment = Alignment.CenterHorizontally,
|
horizontalAlignment = Alignment.CenterHorizontally,
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
|
|
|
@ -2,6 +2,7 @@ package eu.kanade.tachiyomi.crash
|
||||||
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import androidx.core.view.WindowCompat
|
||||||
import eu.kanade.presentation.crash.CrashScreen
|
import eu.kanade.presentation.crash.CrashScreen
|
||||||
import eu.kanade.tachiyomi.ui.base.activity.BaseActivity
|
import eu.kanade.tachiyomi.ui.base.activity.BaseActivity
|
||||||
import eu.kanade.tachiyomi.ui.main.MainActivity
|
import eu.kanade.tachiyomi.ui.main.MainActivity
|
||||||
|
@ -11,6 +12,9 @@ class CrashActivity : BaseActivity() {
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
|
WindowCompat.setDecorFitsSystemWindows(window, false)
|
||||||
|
|
||||||
val exception = GlobalExceptionHandler.getThrowableFromIntent(intent)
|
val exception = GlobalExceptionHandler.getThrowableFromIntent(intent)
|
||||||
setComposeContent {
|
setComposeContent {
|
||||||
CrashScreen(
|
CrashScreen(
|
||||||
|
|
Loading…
Reference in a new issue