Fixed numerous bugs within talk and file upload

This commit is contained in:
2023-08-09 20:59:37 +02:00
parent 03a930cf83
commit 987734626c
7 changed files with 74 additions and 48 deletions

View File

@ -48,10 +48,12 @@ class _ChatTileState extends State<ChatTile> {
@override
Widget build(BuildContext context) {
bool useRemotePicture = widget.data.type == GetRoomResponseObjectConversationType.oneToOne;
CircleAvatar circleAvatar = CircleAvatar(
foregroundImage: widget.data.type == GetRoomResponseObjectConversationType.oneToOne ? Image.network("https://${EndpointData().nextcloud().full()}/avatar/${widget.data.name}/128").image : null,
foregroundImage: useRemotePicture ? Image.network("https://${EndpointData().nextcloud().full()}/avatar/${widget.data.name}/128").image : null,
backgroundColor: Theme.of(context).primaryColor,
foregroundColor: Colors.white,
onForegroundImageError: useRemotePicture ? (o, t) {} : null,
child: widget.data.type == GetRoomResponseObjectConversationType.group ? const Icon(Icons.group) : const Icon(Icons.person),
);