Direct messages

This commit is contained in:
2025-05-04 16:05:18 +08:00
parent 45fe3d191d
commit 4b6a5c28de
12 changed files with 278 additions and 114 deletions

View File

@ -55,9 +55,26 @@ class ChatDetailScreen extends HookConsumerWidget {
leading: PageBackButton(shadows: [iconShadow]),
flexibleSpace: FlexibleSpaceBar(
background:
currentRoom?.backgroundId != null
currentRoom!.type == 1 &&
currentRoom
.members!
.first
.account
.profile
.backgroundId !=
null
? CloudImageWidget(
fileId: currentRoom!.backgroundId!,
fileId:
currentRoom
.members!
.first
.account
.profile
.backgroundId!,
)
: currentRoom.backgroundId != null
? CloudImageWidget(
fileId: currentRoom.backgroundId!,
fit: BoxFit.cover,
)
: Container(
@ -65,7 +82,9 @@ class ChatDetailScreen extends HookConsumerWidget {
Theme.of(context).appBarTheme.backgroundColor,
),
title: Text(
currentRoom?.name ?? 'unknown'.tr(),
currentRoom.type == 1
? currentRoom.members!.first.account.nick
: currentRoom.name,
).textColor(Theme.of(context).appBarTheme.foregroundColor),
),
actions: [