mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-23 04:00:28 +08:00
@@ -38,51 +38,49 @@ class WhisperSessionItem extends StatelessWidget {
|
||||
? theme.colorScheme.onInverseSurface
|
||||
.withValues(alpha: Get.isDarkMode ? 0.4 : 0.8)
|
||||
: null,
|
||||
onLongPress: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return AlertDialog(
|
||||
clipBehavior: Clip.hardEdge,
|
||||
contentPadding: const EdgeInsets.symmetric(vertical: 12),
|
||||
content: DefaultTextStyle(
|
||||
style: const TextStyle(fontSize: 14),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
onLongPress: () => showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return AlertDialog(
|
||||
clipBehavior: Clip.hardEdge,
|
||||
contentPadding: const EdgeInsets.symmetric(vertical: 12),
|
||||
content: DefaultTextStyle(
|
||||
style: const TextStyle(fontSize: 14),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
ListTile(
|
||||
dense: true,
|
||||
onTap: () {
|
||||
Get.back();
|
||||
onSetTop(item.isPinned, item.id);
|
||||
},
|
||||
title: Text(item.isPinned ? '移除置顶' : '置顶'),
|
||||
),
|
||||
if (item.id.privateId.hasTalkerUid())
|
||||
ListTile(
|
||||
dense: true,
|
||||
onTap: () {
|
||||
Get.back();
|
||||
onSetTop(item.isPinned, item.id);
|
||||
onSetMute(item.isMuted, item.id.privateId.talkerUid);
|
||||
},
|
||||
title: Text(item.isPinned ? '移除置顶' : '置顶'),
|
||||
title: Text('${item.isMuted ? '关闭' : '开启'}免打扰'),
|
||||
),
|
||||
if (item.id.privateId.hasTalkerUid())
|
||||
ListTile(
|
||||
dense: true,
|
||||
onTap: () {
|
||||
Get.back();
|
||||
onSetMute(item.isMuted, item.id.privateId.talkerUid);
|
||||
},
|
||||
title: Text('${item.isMuted ? '关闭' : '开启'}免打扰'),
|
||||
),
|
||||
if (item.id.privateId.hasTalkerUid())
|
||||
ListTile(
|
||||
dense: true,
|
||||
onTap: () {
|
||||
Get.back();
|
||||
onRemove(item.id.privateId.talkerUid.toInt());
|
||||
},
|
||||
title: const Text('删除'),
|
||||
),
|
||||
],
|
||||
),
|
||||
if (item.id.privateId.hasTalkerUid())
|
||||
ListTile(
|
||||
dense: true,
|
||||
onTap: () {
|
||||
Get.back();
|
||||
onRemove(item.id.privateId.talkerUid.toInt());
|
||||
},
|
||||
title: const Text('删除'),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
onTap: () {
|
||||
if (item.hasUnread()) {
|
||||
item.clearUnread();
|
||||
@@ -169,11 +167,9 @@ class WhisperSessionItem extends StatelessWidget {
|
||||
|
||||
return GestureDetector(
|
||||
onTap: item.sessionInfo.avatar.hasMid()
|
||||
? () {
|
||||
Get.toNamed(
|
||||
? () => Get.toNamed(
|
||||
'/member?mid=${item.sessionInfo.avatar.mid}',
|
||||
);
|
||||
}
|
||||
)
|
||||
: null,
|
||||
child: item.hasUnread() &&
|
||||
item.unread.style != UnreadStyle.UNREAD_STYLE_NONE
|
||||
|
||||
Reference in New Issue
Block a user