Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-07-23 16:47:11 +08:00
parent 148e0872b4
commit 418a1e8d39
821 changed files with 29467 additions and 25520 deletions

View File

@@ -35,16 +35,17 @@ class WhisperSessionItem extends StatelessWidget {
final avatar = resource.hasResImage()
? resource.resImage.imageSrc.remote.url
: resource.hasResAnimation()
? resource.resAnimation.webpSrc.remote.url
: resource.resNativeDraw.drawSrc.remote.url;
? resource.resAnimation.webpSrc.remote.url
: resource.resNativeDraw.drawSrc.remote.url;
Map? vipInfo = item.sessionInfo.hasVipInfo()
? jsonDecode(item.sessionInfo.vipInfo)
: null;
final ThemeData theme = Theme.of(context);
return ListTile(
tileColor: item.isPinned
? theme.colorScheme.onInverseSurface
.withValues(alpha: Get.isDarkMode ? 0.4 : 0.8)
? theme.colorScheme.onInverseSurface.withValues(
alpha: Get.isDarkMode ? 0.4 : 0.8,
)
: null,
onLongPress: () => showDialog(
context: context,
@@ -155,13 +156,20 @@ class WhisperSessionItem extends StatelessWidget {
final pendant = item.sessionInfo.avatar.fallbackLayers.layers
.getOrNull(1)
?.resource;
final offcial = item.sessionInfo.avatar.fallbackLayers.layers
.lastOrNull?.resource.resImage.imageSrc;
final offcial = item
.sessionInfo
.avatar
.fallbackLayers
.layers
.lastOrNull
?.resource
.resImage
.imageSrc;
return GestureDetector(
onTap: item.sessionInfo.avatar.hasMid()
? () =>
Get.toNamed('/member?mid=${item.sessionInfo.avatar.mid}')
Get.toNamed('/member?mid=${item.sessionInfo.avatar.mid}')
: null,
child: PendantAvatar(
size: 42,
@@ -169,8 +177,8 @@ class WhisperSessionItem extends StatelessWidget {
avatar: avatar,
garbPendantImage:
pendant?.resImage.imageSrc.remote.hasUrl() == true
? pendant!.resImage.imageSrc.remote.url
: pendant?.resAnimation.webpSrc.remote.url,
? pendant!.resImage.imageSrc.remote.url
: pendant?.resAnimation.webpSrc.remote.url,
isVip: vipInfo?['status'] != null && vipInfo!['status'] > 0,
officialType: offcial?.hasLocalValue() == true
? switch (offcial!.localValue) {
@@ -197,7 +205,8 @@ class WhisperSessionItem extends StatelessWidget {
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 15,
color: vipInfo?['status'] != null &&
color:
vipInfo?['status'] != null &&
vipInfo!['status'] > 0 &&
vipInfo['type'] == 2
? context.vipColor
@@ -240,8 +249,9 @@ class WhisperSessionItem extends StatelessWidget {
item.msgSummary.rawMsg,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: theme.textTheme.labelMedium!
.copyWith(color: theme.colorScheme.outline),
style: theme.textTheme.labelMedium!.copyWith(
color: theme.colorScheme.outline,
),
),
),
if (item.isMuted)
@@ -256,7 +266,7 @@ class WhisperSessionItem extends StatelessWidget {
label: item.unread.style == UnreadStyle.UNREAD_STYLE_NUMBER
? Text(item.unread.number.toString())
: null,
)
),
],
),
);