Skip to content

Commit

Permalink
ios: Fix viewer full screen error
Browse files Browse the repository at this point in the history
  • Loading branch information
violet-dev committed Dec 10, 2023
1 parent 77de2c9 commit ba0ff79
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/pages/viewer/viewer_controller.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// This source code is a part of Project Violet.
// Copyright (C) 2020-2023. violet-team. Licensed under the Apache-2.0 License.

import 'dart:io';

import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
Expand Down Expand Up @@ -214,14 +216,14 @@ class ViewerController extends GetxController {
if (!overlay.value) {
overlay.value = !overlay.value;
opacity.value = 1.0;
if (!Settings.disableFullScreen) {
if (!Settings.disableFullScreen || Platform.isIOS) {
SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: [
SystemUiOverlay.top,
SystemUiOverlay.bottom,
]);
}
} else {
if (!Settings.disableFullScreen) {
if (!Settings.disableFullScreen || Platform.isIOS) {
SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: []);
}
opacity.value = 0.0;
Expand Down

0 comments on commit ba0ff79

Please sign in to comment.