mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-19 08:36:17 +08:00
opt player gesture
Closes #1427 opt dyn/reply check Closes #1430 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -19,6 +19,7 @@ import 'package:PiliPlus/utils/page_utils.dart';
|
|||||||
import 'package:PiliPlus/utils/request_utils.dart';
|
import 'package:PiliPlus/utils/request_utils.dart';
|
||||||
import 'package:PiliPlus/utils/utils.dart';
|
import 'package:PiliPlus/utils/utils.dart';
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
|
import 'package:flutter/foundation.dart' show kDebugMode;
|
||||||
import 'package:flutter/material.dart' hide InkWell;
|
import 'package:flutter/material.dart' hide InkWell;
|
||||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||||
import 'package:get/get.dart' hide ContextExtensionss;
|
import 'package:get/get.dart' hide ContextExtensionss;
|
||||||
@@ -370,7 +371,7 @@ class AuthorPanel extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
minLeadingWidth: 0,
|
minLeadingWidth: 0,
|
||||||
),
|
),
|
||||||
if (moduleAuthor.mid == Accounts.main.mid) ...[
|
if (kDebugMode || moduleAuthor.mid == Accounts.main.mid) ...[
|
||||||
ListTile(
|
ListTile(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.back();
|
Get.back();
|
||||||
|
|||||||
@@ -1055,7 +1055,7 @@ class ReplyItemGrpc extends StatelessWidget {
|
|||||||
leading: const Icon(Icons.save_alt, size: 19),
|
leading: const Icon(Icons.save_alt, size: 19),
|
||||||
title: Text('保存评论', style: style),
|
title: Text('保存评论', style: style),
|
||||||
),
|
),
|
||||||
if (item.mid == ownerMid)
|
if (kDebugMode || item.mid == ownerMid)
|
||||||
ListTile(
|
ListTile(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.back();
|
Get.back();
|
||||||
|
|||||||
@@ -1058,7 +1058,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
|||||||
|
|
||||||
void onTap(PointerDeviceKind? kind) {
|
void onTap(PointerDeviceKind? kind) {
|
||||||
switch (kind) {
|
switch (kind) {
|
||||||
case ui.PointerDeviceKind.mouse:
|
case ui.PointerDeviceKind.mouse when Utils.isDesktop:
|
||||||
onTapDesktop();
|
onTapDesktop();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -1069,7 +1069,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
|||||||
|
|
||||||
void onDoubleTapDown(TapDownDetails details) {
|
void onDoubleTapDown(TapDownDetails details) {
|
||||||
switch (details.kind) {
|
switch (details.kind) {
|
||||||
case ui.PointerDeviceKind.mouse:
|
case ui.PointerDeviceKind.mouse when Utils.isDesktop:
|
||||||
onDoubleTapDesktop();
|
onDoubleTapDesktop();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -105,6 +105,7 @@ class ReplyUtils {
|
|||||||
title: const Text('评论检查结果'),
|
title: const Text('评论检查结果'),
|
||||||
content: SelectableText(message),
|
content: SelectableText(message),
|
||||||
actions: [
|
actions: [
|
||||||
|
if (isBan)
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Get.back();
|
Get.back();
|
||||||
|
|||||||
@@ -317,14 +317,16 @@ abstract class RequestUtils {
|
|||||||
await Future.delayed(const Duration(seconds: 5));
|
await Future.delayed(const Duration(seconds: 5));
|
||||||
}
|
}
|
||||||
var res = await DynamicsHttp.dynamicDetail(id: id, clearCookie: true);
|
var res = await DynamicsHttp.dynamicDetail(id: id, clearCookie: true);
|
||||||
|
final isSuccess = res.isSuccess;
|
||||||
Get.dialog(
|
Get.dialog(
|
||||||
barrierDismissible: isManual,
|
barrierDismissible: isManual,
|
||||||
AlertDialog(
|
AlertDialog(
|
||||||
title: const Text('动态检查结果'),
|
title: const Text('动态检查结果'),
|
||||||
content: SelectableText(
|
content: SelectableText(
|
||||||
'${res.isSuccess ? '无账号状态下找到了你的动态,动态正常!' : '你的动态被shadow ban(仅自己可见)!'}${dynText != null ? ' \n\n动态内容: $dynText' : ''}',
|
'${isSuccess ? '无账号状态下找到了你的动态,动态正常!' : '你的动态被shadow ban(仅自己可见)!'}${dynText != null ? ' \n\n动态内容: $dynText' : ''}',
|
||||||
),
|
),
|
||||||
actions: [
|
actions: [
|
||||||
|
if (!isSuccess)
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Get.back();
|
Get.back();
|
||||||
|
|||||||
Reference in New Issue
Block a user