mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-16 07:06:14 +08:00
opt gesture
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -11,6 +11,7 @@ import 'package:PiliPlus/models_new/media_list/media_list.dart';
|
||||
import 'package:PiliPlus/models_new/video/video_detail/episode.dart';
|
||||
import 'package:PiliPlus/pages/common/slide/common_slide_page.dart';
|
||||
import 'package:PiliPlus/utils/duration_utils.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
import 'package:flutter/material.dart' hide RefreshCallback;
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -154,6 +155,12 @@ class _MediaListPanelState extends State<MediaListPanel>
|
||||
bool isCurr,
|
||||
bool showDelBtn,
|
||||
) {
|
||||
void onLongPress() => imageSaveDialog(
|
||||
title: item.title,
|
||||
cover: item.cover,
|
||||
aid: item.aid,
|
||||
bvid: item.bvid,
|
||||
);
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(bottom: 2),
|
||||
child: SizedBox(
|
||||
@@ -169,12 +176,8 @@ class _MediaListPanelState extends State<MediaListPanel>
|
||||
Get.back();
|
||||
widget.onChangeEpisode(item);
|
||||
},
|
||||
onLongPress: () => imageSaveDialog(
|
||||
title: item.title,
|
||||
cover: item.cover,
|
||||
aid: item.aid,
|
||||
bvid: item.bvid,
|
||||
),
|
||||
onLongPress: onLongPress,
|
||||
onSecondaryTap: Utils.isMobile ? null : onLongPress,
|
||||
child: Stack(
|
||||
clipBehavior: Clip.none,
|
||||
children: [
|
||||
|
||||
@@ -7,6 +7,7 @@ import 'package:PiliPlus/grpc/bilibili/main/community/reply/v1.pb.dart'
|
||||
import 'package:PiliPlus/models/common/badge_type.dart';
|
||||
import 'package:PiliPlus/models/common/reply/reply_search_type.dart';
|
||||
import 'package:PiliPlus/utils/duration_utils.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
@@ -47,14 +48,16 @@ class ReplySearchItem extends StatelessWidget {
|
||||
cover = article.covers.firstOrNull ?? '';
|
||||
upNickname = article.upNickname;
|
||||
}
|
||||
void onLongPress() => imageSaveDialog(
|
||||
title: title,
|
||||
cover: cover,
|
||||
);
|
||||
return Material(
|
||||
type: MaterialType.transparency,
|
||||
child: InkWell(
|
||||
onTap: () => Get.back(result: (title: title, url: item.url)),
|
||||
onLongPress: () => imageSaveDialog(
|
||||
title: title,
|
||||
cover: cover,
|
||||
),
|
||||
onLongPress: onLongPress,
|
||||
onSecondaryTap: Utils.isMobile ? null : onLongPress,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: StyleString.safeSpace,
|
||||
|
||||
Reference in New Issue
Block a user