opt mouse control

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-09-28 15:33:09 +08:00
parent 2031604ea2
commit 5f8dc76891
19 changed files with 268 additions and 191 deletions

View File

@@ -111,6 +111,14 @@ class _FansPageState extends State<FansPage> {
}
Widget _buildItem(ColorScheme theme, int index, FansItemModel item) {
final isSelect = widget.onSelect != null;
void onRemove() => showConfirmDialog(
context: context,
title: '确定移除 ${item.uname} ',
onConfirm: () => _fansController.onRemoveFan(index, item.mid!),
);
final flag = !isSelect && isOwner;
return SizedBox(
height: 66,
child: InkWell(
@@ -127,15 +135,8 @@ class _FansPageState extends State<FansPage> {
}
Get.toNamed('/member?mid=${item.mid}');
},
onLongPress: widget.onSelect != null
? null
: isOwner
? () => showConfirmDialog(
context: context,
title: '确定移除 ${item.uname} ',
onConfirm: () => _fansController.onRemoveFan(index, item.mid!),
)
: null,
onLongPress: flag && Utils.isMobile ? onRemove : null,
onSecondaryTap: flag && !Utils.isMobile ? onRemove : null,
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 12,