Skip to content

Commit

Permalink
Merge branch 'fix'
Browse files Browse the repository at this point in the history
  • Loading branch information
guozhigq committed Mar 21, 2024
2 parents 00b81b1 + 6d276fc commit 59641f0
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
12 changes: 8 additions & 4 deletions lib/http/interceptor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,14 @@ class ApiInterceptor extends Interceptor {
void onError(DioException err, ErrorInterceptorHandler handler) async {
// 处理网络请求错误
// handler.next(err);
SmartDialog.showToast(
await dioError(err),
displayType: SmartToastType.onlyRefresh,
);
String url = err.requestOptions.uri.toString();
print('🌹🌹ApiInterceptor: $url');
if (!url.contains('heartBeat')) {
SmartDialog.showToast(
await dioError(err),
displayType: SmartToastType.onlyRefresh,
);
}
super.onError(err, handler);
}

Expand Down
6 changes: 4 additions & 2 deletions lib/pages/history/controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,10 @@ class HistoryController extends GetxController {
// 观看历史暂停状态
Future historyStatus() async {
var res = await UserHttp.historyStatus();
pauseStatus.value = res.data['data'];
localCache.put(LocalCacheKey.historyPause, res.data['data']);
if (res.data['code'] == 0) {
pauseStatus.value = res.data['data'];
localCache.put(LocalCacheKey.historyPause, res.data['data']);
}
}

// 清空观看历史
Expand Down
7 changes: 6 additions & 1 deletion lib/pages/media/view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:get/get.dart';
import 'package:media_kit/media_kit.dart';
import 'package:pilipala/common/widgets/network_img_layer.dart';
import 'package:pilipala/models/user/fav_folder.dart';
import 'package:pilipala/pages/main/index.dart';
Expand Down Expand Up @@ -102,7 +103,11 @@ class _MediaPageState extends State<MediaPage>
],
Obx(() => mediaController.userLogin.value
? favFolder(mediaController, context)
: const SizedBox())
: const SizedBox()),
SizedBox(
height: MediaQuery.of(context).padding.bottom +
kBottomNavigationBarHeight,
)
],
),
),
Expand Down
1 change: 1 addition & 0 deletions lib/plugin/pl_player/view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
children: <Widget>[
Obx(
() => Video(
key: ValueKey(_.videoFit.value),
controller: videoController,
controls: NoVideoControls,
pauseUponEnteringBackgroundMode: !enableBackgroundPlay,
Expand Down

0 comments on commit 59641f0

Please sign in to comment.