Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Fix tray status updates and a bug with the private button refresh (#3840
Browse files Browse the repository at this point in the history
)
  • Loading branch information
keianhzo authored Aug 20, 2020
1 parent 6226a4f commit f9782a2
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,12 @@ public void updateUI() {

return false;
});

mBinding.leftController.setVisibility(mLeftControllerBatteryLevel < 0 ? View.GONE : View.VISIBLE);
mBinding.rightController.setVisibility(mRightControllerBatteryLevel < 0 ? View.GONE : View.VISIBLE);

updateTime();
updateWifi();
}

public void start(Context context) {
Expand Down Expand Up @@ -569,7 +575,7 @@ public void attachToWindow(@NonNull WindowWidget aWindow) {
};

private Observer<ObservableBoolean> mIsPrivateSession = aBoolean -> {
if (mBinding.privateButton.isHovered()) {
if (mBinding.privateButton.isHovered() || mViewModel.getIsPrivateSession().getValue().get() == aBoolean.get()) {
return;
}
if (aBoolean.get()) {
Expand Down

0 comments on commit f9782a2

Please sign in to comment.