Compare commits
2 Commits
develop-so
...
develop-fi
Author | SHA1 | Date | |
---|---|---|---|
8000475c1f | |||
da772f17cc |
@ -13,23 +13,16 @@ class ParticipantsListView extends StatefulWidget {
|
||||
|
||||
class _ParticipantsListViewState extends State<ParticipantsListView> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final participants = widget.participantsResponse.data.map((participant) => ListTile(
|
||||
leading: UserAvatar(id: participant.actorId),
|
||||
title: Text(participant.displayName),
|
||||
subtitle: participant.statusMessage != null ? Text(participant.statusMessage!) : null,
|
||||
)).toList();
|
||||
|
||||
lastname(participant) => participant.title.toString().split(' ').last;
|
||||
participants.sort((a, b) => lastname(a).compareTo(lastname(b)));
|
||||
|
||||
return Scaffold(
|
||||
Widget build(BuildContext context) => Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Teilnehmende'),
|
||||
),
|
||||
body: ListView(
|
||||
children: participants,
|
||||
children: widget.participantsResponse.data.map((participant) => ListTile(
|
||||
leading: UserAvatar(id: participant.actorId),
|
||||
title: Text(participant.displayName),
|
||||
subtitle: participant.statusMessage != null ? Text(participant.statusMessage!) : null,
|
||||
)).toList(),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -21,22 +21,25 @@ class ChatMessage {
|
||||
ChatMessage({required this.originalMessage, this.originalData}) {
|
||||
if(originalData?.containsKey('file') ?? false) {
|
||||
file = originalData?['file'];
|
||||
content = file?.name ?? 'Datei';
|
||||
} else {
|
||||
content = RichObjectStringProcessor.parseToString(originalMessage, originalData);
|
||||
}
|
||||
content = RichObjectStringProcessor.parseToString(originalMessage, originalData);
|
||||
}
|
||||
|
||||
Widget getWidget() {
|
||||
|
||||
if(file == null) {
|
||||
return Linkify(
|
||||
var contentWidget = Linkify(
|
||||
text: content,
|
||||
onOpen: onOpen,
|
||||
);
|
||||
}
|
||||
|
||||
return Padding(padding: const EdgeInsets.only(top: 5), child: CachedNetworkImage(
|
||||
if(file == null) return contentWidget;
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(top: 5),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
CachedNetworkImage(
|
||||
errorWidget: (context, url, error) => Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
@ -53,7 +56,12 @@ class ChatMessage {
|
||||
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',
|
||||
));
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
contentWidget
|
||||
],
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> onOpen(LinkableElement link) async {
|
||||
|
Reference in New Issue
Block a user