mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-02 00:58:19 +08:00
@@ -708,13 +708,12 @@ class HeaderControlState extends State<HeaderControl>
|
||||
onTap: () async {
|
||||
Get.back();
|
||||
try {
|
||||
final FilePickerResult? file = await FilePicker.platform
|
||||
.pickFiles();
|
||||
if (file != null) {
|
||||
final first = file.files.first;
|
||||
final path = first.path;
|
||||
final result = await FilePicker.platform.pickFiles();
|
||||
if (result != null) {
|
||||
final file = result.files.single;
|
||||
final path = file.path;
|
||||
if (path != null) {
|
||||
final name = first.name;
|
||||
final name = file.name;
|
||||
final length = videoDetailCtr.subtitles.length;
|
||||
if (name.endsWith('.json')) {
|
||||
final file = File(path);
|
||||
|
||||
@@ -230,6 +230,7 @@ class PlPlayerController {
|
||||
late bool isDesktopPip = false;
|
||||
late Rect _lastWindowBounds;
|
||||
|
||||
late final showWindowTitleBar = Pref.showWindowTitleBar;
|
||||
late final RxBool isAlwaysOnTop = false.obs;
|
||||
Future<void> setAlwaysOnTop(bool value) {
|
||||
isAlwaysOnTop.value = value;
|
||||
@@ -239,8 +240,8 @@ class PlPlayerController {
|
||||
Future<void> exitDesktopPip() {
|
||||
isDesktopPip = false;
|
||||
return Future.wait([
|
||||
windowManager.setTitleBarStyle(
|
||||
Pref.showWindowTitleBar ? TitleBarStyle.normal : TitleBarStyle.hidden),
|
||||
if (showWindowTitleBar)
|
||||
windowManager.setTitleBarStyle(TitleBarStyle.normal),
|
||||
windowManager.setMinimumSize(const Size(400, 700)),
|
||||
windowManager.setBounds(_lastWindowBounds),
|
||||
setAlwaysOnTop(false),
|
||||
@@ -255,7 +256,9 @@ class PlPlayerController {
|
||||
|
||||
_lastWindowBounds = await windowManager.getBounds();
|
||||
|
||||
if (showWindowTitleBar) {
|
||||
windowManager.setTitleBarStyle(TitleBarStyle.hidden);
|
||||
}
|
||||
|
||||
late final Size size;
|
||||
final state = videoController!.player.state;
|
||||
|
||||
Reference in New Issue
Block a user