@ -47,7 +47,7 @@ class _ChatInfoState extends State<ChatInfo> {
|
||||
const SizedBox(height: 30),
|
||||
GestureDetector(
|
||||
child: UserAvatar(
|
||||
username: widget.room.name,
|
||||
id: isGroup ? widget.room.token : widget.room.name,
|
||||
isGroup: isGroup,
|
||||
size: 80,
|
||||
),
|
||||
|
@ -21,7 +21,7 @@ class _ParticipantsListViewState extends State<ParticipantsListView> {
|
||||
body: ListView(
|
||||
children: widget.participantsResponse.data.map((participant) {
|
||||
return ListTile(
|
||||
leading: UserAvatar(username: participant.actorId),
|
||||
leading: UserAvatar(id: participant.actorId),
|
||||
title: Text(participant.displayName),
|
||||
subtitle: participant.statusMessage != null ? Text(participant.statusMessage!) : null,
|
||||
);
|
||||
|
@ -31,6 +31,7 @@ class ChatTile extends StatefulWidget {
|
||||
|
||||
class _ChatTileState extends State<ChatTile> {
|
||||
late String username;
|
||||
late UserAvatar circleAvatar;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@ -38,6 +39,9 @@ class _ChatTileState extends State<ChatTile> {
|
||||
SharedPreferences.getInstance().then((value) => {
|
||||
username = value.getString("username")!
|
||||
});
|
||||
|
||||
bool isGroup = widget.data.type != GetRoomResponseObjectConversationType.oneToOne;
|
||||
circleAvatar = UserAvatar(id: isGroup ? widget.data.token : widget.data.name, isGroup: isGroup);
|
||||
}
|
||||
|
||||
void setCurrentAsRead() {
|
||||
@ -50,10 +54,9 @@ class _ChatTileState extends State<ChatTile> {
|
||||
).run().then((value) => widget.query(renew: true));
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
bool isGroup = widget.data.type != GetRoomResponseObjectConversationType.oneToOne;
|
||||
UserAvatar circleAvatar = UserAvatar(username: widget.data.name, isGroup: isGroup);
|
||||
|
||||
return Consumer<ChatProps>(builder: (context, chatData, child) {
|
||||
return ListTile(
|
||||
|
@ -55,7 +55,7 @@ class _MessageReactionsState extends State<MessageReactions> {
|
||||
children: entry.value.map((e) {
|
||||
bool isSelf = AccountData().getUsername() == e.actorId;
|
||||
return ListTile(
|
||||
leading: UserAvatar(username: e.actorId, isGroup: false),
|
||||
leading: UserAvatar(id: e.actorId, isGroup: false),
|
||||
title: Text(e.actorDisplayName),
|
||||
subtitle: isSelf
|
||||
? const Text("Du")
|
||||
|
Reference in New Issue
Block a user