From 5c68772f7bddfcf5e8166ffb824dbab8befa1b8d Mon Sep 17 00:00:00 2001 From: guozhigq Date: Sun, 17 Sep 2023 14:20:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20toast=E6=98=BE=E7=A4=BA=E3=80=81seek?= =?UTF-8?q?=E5=90=8E=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95=E4=B8=8D=E8=AF=B7?= =?UTF-8?q?=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/http/interceptor.dart | 5 ++++- lib/plugin/pl_player/controller.dart | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/http/interceptor.dart b/lib/http/interceptor.dart index 4b9e8770..7b398caa 100644 --- a/lib/http/interceptor.dart +++ b/lib/http/interceptor.dart @@ -46,7 +46,10 @@ class ApiInterceptor extends Interceptor { void onError(DioException err, ErrorInterceptorHandler handler) async { // 处理网络请求错误 // handler.next(err); - SmartDialog.showToast(await dioError(err)); + SmartDialog.showToast( + await dioError(err), + displayType: SmartToastType.onlyRefresh, + ); super.onError(err, handler); } diff --git a/lib/plugin/pl_player/controller.dart b/lib/plugin/pl_player/controller.dart index 4478e8d0..f47d3963 100644 --- a/lib/plugin/pl_player/controller.dart +++ b/lib/plugin/pl_player/controller.dart @@ -510,6 +510,7 @@ class PlPlayerController { position = Duration.zero; } _position.value = position; + _heartDuration = position.inSeconds; if (duration.value.inSeconds != 0) { if (type != 'slider') { /// 拖动进度条调节时,不等待第一帧,防止抖动 @@ -878,7 +879,7 @@ class PlPlayerController { } // 记录播放记录 - Future makeHeartBeat(progress, {type = 'playing'}) async { + Future makeHeartBeat(int progress, {type = 'playing'}) async { if (!_enableHeart) { return false; }