minor fixes
This commit is contained in:
parent
cb067aa1ac
commit
b8e9786f4d
2 changed files with 34 additions and 33 deletions
|
@ -626,7 +626,7 @@ class _CollectionAppBarState extends State<CollectionAppBar> with SingleTickerPr
|
|||
void _onQueryFocusRequest() => _queryBarFocusNode.requestFocus();
|
||||
|
||||
void _updateStatusBarHeight() {
|
||||
if (!context.mounted) {
|
||||
if (!mounted) {
|
||||
return;
|
||||
}
|
||||
_statusBarHeight = MediaQuery.paddingOf(context).top;
|
||||
|
|
|
@ -2,6 +2,7 @@ import 'dart:async';
|
|||
import 'dart:math';
|
||||
|
||||
import 'package:aves/app_mode.dart';
|
||||
import 'package:aves/model/device.dart';
|
||||
import 'package:aves/model/entry/entry.dart';
|
||||
import 'package:aves/model/entry/extensions/multipage.dart';
|
||||
import 'package:aves/model/entry/extensions/props.dart';
|
||||
|
@ -227,8 +228,9 @@ mixin EntryViewControllerMixin<T extends StatefulWidget> on State<T> {
|
|||
static const _pipRatioMin = Rational(18, 43);
|
||||
|
||||
Future<void> updatePictureInPicture(BuildContext context) async {
|
||||
if (context.mounted) {
|
||||
if (settings.videoBackgroundMode == VideoBackgroundMode.pip) {
|
||||
if (!device.supportPictureInPicture) return;
|
||||
|
||||
if (context.mounted && settings.videoBackgroundMode == VideoBackgroundMode.pip) {
|
||||
final playingController = context.read<VideoConductor>().getPlayingController();
|
||||
if (playingController != null) {
|
||||
final entrySize = playingController.entry.displaySize;
|
||||
|
@ -263,7 +265,6 @@ mixin EntryViewControllerMixin<T extends StatefulWidget> on State<T> {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
debugPrint('Cancelling picture-in-picture');
|
||||
await Floating().cancelOnLeavePiP();
|
||||
|
|
Loading…
Reference in a new issue