♻️ Better image loading animation and more commonly used blurhash
This commit is contained in:
@@ -178,7 +178,7 @@ class EditChatScreen extends HookConsumerWidget {
|
||||
bottom: -32,
|
||||
child: GestureDetector(
|
||||
child: ProfilePictureWidget(
|
||||
fileId: picture.value?.id,
|
||||
file: picture.value,
|
||||
radius: 40,
|
||||
fallbackIcon: Symbols.group,
|
||||
),
|
||||
|
||||
@@ -98,15 +98,15 @@ class PublicRoomPreview extends HookConsumerWidget {
|
||||
SizedBox(
|
||||
height: 26,
|
||||
width: 26,
|
||||
child: (room.type == 1 && room.picture?.id == null)
|
||||
child: (room.type == 1 && room.picture == null)
|
||||
? SplitAvatarWidget(
|
||||
filesId: room.members!
|
||||
.map((e) => e.account.profile.picture?.id)
|
||||
files: room.members!
|
||||
.map((e) => e.account.profile.picture)
|
||||
.toList(),
|
||||
)
|
||||
: room.picture?.id != null
|
||||
: room.picture != null
|
||||
? ProfilePictureWidget(
|
||||
fileId: room.picture?.id,
|
||||
file: room.picture,
|
||||
fallbackIcon: Symbols.chat,
|
||||
)
|
||||
: CircleAvatar(
|
||||
@@ -131,15 +131,15 @@ class PublicRoomPreview extends HookConsumerWidget {
|
||||
SizedBox(
|
||||
height: 26,
|
||||
width: 26,
|
||||
child: (room.type == 1 && room.picture?.id == null)
|
||||
child: (room.type == 1 && room.picture == null)
|
||||
? SplitAvatarWidget(
|
||||
filesId: room.members!
|
||||
.map((e) => e.account.profile.picture?.id)
|
||||
files: room.members!
|
||||
.map((e) => e.account.profile.picture)
|
||||
.toList(),
|
||||
)
|
||||
: room.picture?.id != null
|
||||
: room.picture != null
|
||||
? ProfilePictureWidget(
|
||||
fileId: room.picture?.id,
|
||||
file: room.picture,
|
||||
fallbackIcon: Symbols.chat,
|
||||
)
|
||||
: CircleAvatar(
|
||||
|
||||
@@ -427,15 +427,15 @@ class ChatRoomScreen extends HookConsumerWidget {
|
||||
child: SizedBox(
|
||||
height: 26,
|
||||
width: 26,
|
||||
child: (room!.type == 1 && room.picture?.id == null)
|
||||
child: (room!.type == 1 && room.picture == null)
|
||||
? SplitAvatarWidget(
|
||||
filesId: getValidMembers(
|
||||
files: getValidMembers(
|
||||
room.members!,
|
||||
).map((e) => e.account.profile.picture?.id).toList(),
|
||||
).map((e) => e.account.profile.picture).toList(),
|
||||
)
|
||||
: room.picture?.id != null
|
||||
: room.picture != null
|
||||
? ProfilePictureWidget(
|
||||
fileId: room.picture?.id,
|
||||
file: room.picture,
|
||||
fallbackIcon: Symbols.chat,
|
||||
)
|
||||
: CircleAvatar(
|
||||
@@ -473,15 +473,15 @@ class ChatRoomScreen extends HookConsumerWidget {
|
||||
child: SizedBox(
|
||||
height: 28,
|
||||
width: 28,
|
||||
child: (room!.type == 1 && room.picture?.id == null)
|
||||
child: (room!.type == 1 && room.picture == null)
|
||||
? SplitAvatarWidget(
|
||||
filesId: getValidMembers(
|
||||
files: getValidMembers(
|
||||
room.members!,
|
||||
).map((e) => e.account.profile.picture?.id).toList(),
|
||||
).map((e) => e.account.profile.picture).toList(),
|
||||
)
|
||||
: room.picture?.id != null
|
||||
: room.picture != null
|
||||
? ProfilePictureWidget(
|
||||
fileId: room.picture?.id,
|
||||
file: room.picture,
|
||||
fallbackIcon: Symbols.chat,
|
||||
)
|
||||
: CircleAvatar(
|
||||
|
||||
@@ -279,9 +279,8 @@ class ChatDetailScreen extends HookConsumerWidget {
|
||||
leading: PageBackButton(shadows: [iconShadow]),
|
||||
flexibleSpace: FlexibleSpaceBar(
|
||||
background:
|
||||
(currentRoom!.type == 1 &&
|
||||
currentRoom.background?.id != null)
|
||||
? CloudImageWidget(fileId: currentRoom.background!.id)
|
||||
(currentRoom!.type == 1 && currentRoom.background != null)
|
||||
? CloudImageWidget(file: currentRoom.background!)
|
||||
: (currentRoom.type == 1 &&
|
||||
currentRoom.members!.length == 1 &&
|
||||
currentRoom
|
||||
@@ -293,17 +292,16 @@ class ChatDetailScreen extends HookConsumerWidget {
|
||||
?.id !=
|
||||
null)
|
||||
? CloudImageWidget(
|
||||
fileId: currentRoom
|
||||
file: currentRoom
|
||||
.members!
|
||||
.first
|
||||
.account
|
||||
.profile
|
||||
.background!
|
||||
.id,
|
||||
.background!,
|
||||
)
|
||||
: currentRoom.background?.id != null
|
||||
: currentRoom.background != null
|
||||
? CloudImageWidget(
|
||||
fileId: currentRoom.background!.id,
|
||||
file: currentRoom.background!,
|
||||
fit: BoxFit.cover,
|
||||
)
|
||||
: Container(
|
||||
@@ -702,7 +700,7 @@ class _ChatMemberListSheet extends HookConsumerWidget {
|
||||
leading: AccountPfcGestureDetector(
|
||||
uname: member.account.name,
|
||||
child: ProfilePictureWidget(
|
||||
fileId: member.account.profile.picture?.id,
|
||||
file: member.account.profile.picture,
|
||||
),
|
||||
),
|
||||
title: Row(
|
||||
|
||||
Reference in New Issue
Block a user