#20 Updated missing file preview message and download animation
This commit is contained in:
@ -38,17 +38,22 @@ class ChatMessage {
|
||||
|
||||
return CachedNetworkImage(
|
||||
errorWidget: (context, url, error) {
|
||||
return Column(
|
||||
return Padding(padding: const EdgeInsets.only(top: 10), child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(Icons.image_not_supported_outlined, size: 35),
|
||||
Text("Keine Dateivorschau:\n${file!.name}", style: const TextStyle(fontWeight: FontWeight.bold))
|
||||
const Icon(Icons.file_open_outlined, size: 35),
|
||||
const SizedBox(width: 10),
|
||||
Expanded(child: Text(file!.name, style: const TextStyle(fontWeight: FontWeight.bold)))
|
||||
],
|
||||
);
|
||||
));
|
||||
},
|
||||
alignment: Alignment.center,
|
||||
placeholder: (context, url) {
|
||||
return const Padding(padding: EdgeInsets.all(10), child: CircularProgressIndicator());
|
||||
},
|
||||
fadeInDuration: Duration.zero,
|
||||
fadeOutDuration: Duration.zero,
|
||||
errorListener: (value) {},
|
||||
imageUrl: "https://${AccountData().buildHttpAuthString()}@${EndpointData().nextcloud().full()}/index.php/core/preview?fileId=${file!.id}&x=100&y=-1&a=1",
|
||||
);
|
||||
}
|
||||
@ -56,8 +61,6 @@ class ChatMessage {
|
||||
void onOpen(LinkableElement link) async {
|
||||
if(await canLaunchUrlString(link.url)) {
|
||||
await launchUrlString(link.url);
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user