Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 03d78c22 authored by Arian's avatar Arian Committed by Bruno Martins
Browse files

VolumeDialog: Fix muting streams with a minimal volume of 1



* Alarm and voice call streams report 1 as levelMin
  and hence ss.muted is never true, so that the muted
  icon never shows. After the first tap lastAudibleLevel
  is 1 so that the second tap only sets it back to 1,
  the minimal value for some streams.
  That leads to a bad UX when tapping on the icon
  because the first tap sets it to the minimal level and
  another tap just keeps it there.

* With this patch we only set lastAudibleLevel if the
  current level is higher then levelMin instead of the
  hard-coded value of 0 so that the first tap sets the
  volume to its minimal value and the icon changes to the
  muted icon and the second tap restores the previous volume.

* Also replace the check to show the muted icon with a check
  wether the current level is the minimal level.

* Increase the default value of lastAudibleLevel to 2 so that
  it is never equal to the minimal value.

Change-Id: I6d0d3960a42c949e2afd61eab86f5e3ffb8fa1b5
Signed-off-by: default avatarJesse Chan <jc@lineageos.org>
parent d4ccd5db
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment