Skip to content

Commit

Permalink
Fix: fix brightness & volume switch bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackiu1997 committed Feb 4, 2023
1 parent e149768 commit 264b154
Showing 1 changed file with 6 additions and 5 deletions.
Expand Up @@ -401,11 +401,12 @@ class _BrightnessVolumnDargAreaState extends State<BrightnessVolumnDargArea> {
if (controller.showLocked.value) return;
if (delta.distance < 0.2) return;

if (_hideBVStuff) {
_isDargLeft = (postion.dx > (widget.videoWith / 2)) ? false : true;
// disable windows brightness
if (Platform.isWindows && _isDargLeft) return;

// fix darg left change to switch bug
final dargLeft = (postion.dx > (widget.videoWith / 2)) ? false : true;
// disable windows brightness
if (Platform.isWindows && dargLeft) return;
if (_hideBVStuff || _isDargLeft != dargLeft) {
_isDargLeft = dargLeft;
if (_isDargLeft) {
await controller.brightness().then((double v) {
setState(() => _updateDargVarVal = v);
Expand Down

0 comments on commit 264b154

Please sign in to comment.