mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
@@ -211,30 +211,8 @@ abstract class CommonDynPageState<T extends StatefulWidget> extends State<T>
|
|||||||
EasyThrottle.throttle('replyReply', const Duration(milliseconds: 500), () {
|
EasyThrottle.throttle('replyReply', const Duration(milliseconds: 500), () {
|
||||||
int oid = replyItem.oid.toInt();
|
int oid = replyItem.oid.toInt();
|
||||||
int rpid = replyItem.id.toInt();
|
int rpid = replyItem.id.toInt();
|
||||||
Widget replyReplyPage({bool showBackBtn = true}) => Scaffold(
|
Widget replyReplyPage({bool showBackBtn = true}) {
|
||||||
resizeToAvoidBottomInset: false,
|
final child = ViewSafeArea(
|
||||||
appBar: AppBar(
|
|
||||||
primary: showBackBtn,
|
|
||||||
toolbarHeight: showBackBtn ? null : 45,
|
|
||||||
title: const Text('评论详情'),
|
|
||||||
titleSpacing: showBackBtn ? null : 12,
|
|
||||||
automaticallyImplyLeading: showBackBtn,
|
|
||||||
actions: showBackBtn
|
|
||||||
? null
|
|
||||||
: [
|
|
||||||
IconButton(
|
|
||||||
tooltip: '关闭',
|
|
||||||
icon: const Icon(Icons.close, size: 20),
|
|
||||||
onPressed: Get.back,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
shape: Border(
|
|
||||||
bottom: BorderSide(
|
|
||||||
color: theme.colorScheme.outline.withValues(alpha: 0.1),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
body: ViewSafeArea(
|
|
||||||
left: showBackBtn,
|
left: showBackBtn,
|
||||||
right: showBackBtn,
|
right: showBackBtn,
|
||||||
child: VideoReplyReplyPanel(
|
child: VideoReplyReplyPanel(
|
||||||
@@ -242,12 +220,28 @@ abstract class CommonDynPageState<T extends StatefulWidget> extends State<T>
|
|||||||
id: id,
|
id: id,
|
||||||
oid: oid,
|
oid: oid,
|
||||||
rpid: rpid,
|
rpid: rpid,
|
||||||
isVideoDetail: false,
|
isVideoDetail: !showBackBtn,
|
||||||
replyType: controller.replyType,
|
replyType: controller.replyType,
|
||||||
firstFloor: replyItem,
|
firstFloor: replyItem,
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
);
|
if (showBackBtn) {
|
||||||
|
return Scaffold(
|
||||||
|
resizeToAvoidBottomInset: false,
|
||||||
|
appBar: AppBar(
|
||||||
|
title: const Text('评论详情'),
|
||||||
|
shape: Border(
|
||||||
|
bottom: BorderSide(
|
||||||
|
color: theme.colorScheme.outline.withValues(alpha: 0.1),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
body: child,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return child;
|
||||||
|
}
|
||||||
|
|
||||||
if (isPortrait) {
|
if (isPortrait) {
|
||||||
Get.to(
|
Get.to(
|
||||||
replyReplyPage,
|
replyReplyPage,
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import 'dart:async';
|
|||||||
import 'dart:math' show pi;
|
import 'dart:math' show pi;
|
||||||
|
|
||||||
import 'package:PiliPlus/pages/common/common_intro_controller.dart';
|
import 'package:PiliPlus/pages/common/common_intro_controller.dart';
|
||||||
|
import 'package:PiliPlus/utils/utils.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||||
@@ -40,8 +41,12 @@ abstract class TripleState<T extends StatefulWidget> extends State<T>
|
|||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static final _duration = Utils.isMobile
|
||||||
|
? const Duration(milliseconds: 200)
|
||||||
|
: const Duration(milliseconds: 230);
|
||||||
|
|
||||||
void onStartTriple() {
|
void onStartTriple() {
|
||||||
_timer ??= Timer(const Duration(milliseconds: 200), () {
|
_timer ??= Timer(_duration, () {
|
||||||
HapticFeedback.lightImpact();
|
HapticFeedback.lightImpact();
|
||||||
if (introController.hasTriple) {
|
if (introController.hasTriple) {
|
||||||
SmartDialog.showToast('已完成三连');
|
SmartDialog.showToast('已完成三连');
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import 'package:PiliPlus/utils/storage.dart';
|
|||||||
import 'package:PiliPlus/utils/storage_key.dart';
|
import 'package:PiliPlus/utils/storage_key.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart'
|
import 'package:flutter/services.dart'
|
||||||
show KeyDownEvent, KeyRepeatEvent, KeyUpEvent, LogicalKeyboardKey;
|
show KeyDownEvent, KeyUpEvent, LogicalKeyboardKey;
|
||||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
@@ -177,7 +177,7 @@ class PlayerFocus extends StatelessWidget {
|
|||||||
|
|
||||||
if (key == LogicalKeyboardKey.arrowRight) {
|
if (key == LogicalKeyboardKey.arrowRight) {
|
||||||
if (!plPlayerController.isLive && hasPlayer) {
|
if (!plPlayerController.isLive && hasPlayer) {
|
||||||
if (event is KeyRepeatEvent) {
|
if (event is KeyDownEvent) {
|
||||||
if (!plPlayerController.longPressStatus.value) {
|
if (!plPlayerController.longPressStatus.value) {
|
||||||
plPlayerController.longPressTimer ??= Timer(
|
plPlayerController.longPressTimer ??= Timer(
|
||||||
const Duration(milliseconds: 200),
|
const Duration(milliseconds: 200),
|
||||||
|
|||||||
Reference in New Issue
Block a user