MessageListScreen: prettier image loading errors
This commit is contained in:
@@ -40,6 +40,8 @@ import androidx.compose.ui.draw.clip
|
|||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
import androidx.compose.ui.platform.LocalUriHandler
|
import androidx.compose.ui.platform.LocalUriHandler
|
||||||
|
import androidx.compose.ui.text.TextStyle
|
||||||
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
import androidx.compose.ui.text.input.TextFieldValue
|
import androidx.compose.ui.text.input.TextFieldValue
|
||||||
import androidx.compose.ui.text.style.TextAlign
|
import androidx.compose.ui.text.style.TextAlign
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
@@ -401,7 +403,22 @@ fun ImageBubble(
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
error = {
|
error = {
|
||||||
Text("(Error loading attachment)")
|
val error = it.result.throwable.message
|
||||||
|
Surface(
|
||||||
|
color = Color.Red
|
||||||
|
) {
|
||||||
|
Column(modifier = Modifier.padding(20.dp)) {
|
||||||
|
Text(
|
||||||
|
text = "Error loading attachment",
|
||||||
|
style = TextStyle.Default.copy(
|
||||||
|
fontWeight = FontWeight.Bold,
|
||||||
|
textAlign = TextAlign.Center,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
Text("$error")
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
contentDescription = "Image attachment",
|
contentDescription = "Image attachment",
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<network-security-config>
|
<network-security-config>
|
||||||
<domain-config cleartextTrafficPermitted="true">
|
<domain-config cleartextTrafficPermitted="true">
|
||||||
<domain includeSubdomains="true">192.168.1.123</domain>
|
<domain includeSubdomains="true">10.0.2.2</domain>
|
||||||
<domain includeSubdomains="true">tesseract.localdomain</domain>
|
<domain includeSubdomains="true">tesseract.localdomain</domain>
|
||||||
<domain includeSubdomains="true">buzzert.kordophone.nor</domain>
|
<domain includeSubdomains="true">buzzert.kordophone.nor</domain>
|
||||||
</domain-config>
|
</domain-config>
|
||||||
|
|||||||
Reference in New Issue
Block a user