Brightness and orientation only work on mobile

This commit is contained in:
Ming Ming 2021-08-27 15:20:29 +08:00
parent 55065d5122
commit 510e78cc3a

View file

@ -642,9 +642,9 @@ class _ViewerState extends State<Viewer> with DisposableManagerMixin<Viewer> {
bool _canZoom() => !_isDetailPaneActive;
late final disposables = [
_ViewerBrightnessController(),
if (platform_k.isMobile) _ViewerBrightnessController(),
_ViewerSystemUiResetter(),
if (Pref.inst().isViewerForceRotationOr(false))
if (platform_k.isMobile && Pref.inst().isViewerForceRotationOr(false))
_ViewerOrientationController(
onChanged: _onOrientationChanged,
),