mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-08-04 17:50:13 +08:00
@@ -32,12 +32,10 @@ class _WhisperPageState extends State<WhisperPage> {
|
||||
children: _controller.outsideItem.value!.map((e) {
|
||||
return IconButton(
|
||||
tooltip: e.hasTitle() ? e.title : null,
|
||||
onPressed: () {
|
||||
e.type.action(
|
||||
context: context,
|
||||
controller: _controller,
|
||||
);
|
||||
},
|
||||
onPressed: () => e.type.action(
|
||||
context: context,
|
||||
controller: _controller,
|
||||
),
|
||||
icon: e.type.icon,
|
||||
);
|
||||
}).toList());
|
||||
@@ -50,12 +48,10 @@ class _WhisperPageState extends State<WhisperPage> {
|
||||
itemBuilder: (context) {
|
||||
return _controller.threeDotItems.value!
|
||||
.map((e) => PopupMenuItem(
|
||||
onTap: () {
|
||||
e.type.action(
|
||||
context: context,
|
||||
controller: _controller,
|
||||
);
|
||||
},
|
||||
onTap: () => e.type.action(
|
||||
context: context,
|
||||
controller: _controller,
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
e.type.icon,
|
||||
|
||||
@@ -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