Skip to content

fix(linux-rust): Clear stale tray battery on device switch#447

Open
Ryder-C wants to merge 1 commit intokavishdevar:linux/rustfrom
Ryder-C:fix/tray-stale-battery
Open

fix(linux-rust): Clear stale tray battery on device switch#447
Ryder-C wants to merge 1 commit intokavishdevar:linux/rustfrom
Ryder-C:fix/tray-stale-battery

Conversation

@Ryder-C
Copy link

@Ryder-C Ryder-C commented Feb 4, 2026

Problem

When switching from Airpods Max to Airpods (or vice versa), the tray displays battery data from the previous device. Airpods populates battery_l, battery_r, battery_c while Airpods Max populates battery_headphone, the old fields are never cleared so the tray icon doesn't update.

Fix

Reset all battery fields to None when a new device connects, so only the active device's data is shown.

@coderabbitai
Copy link

coderabbitai bot commented Feb 4, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Important

Action Needed: IP Allowlist Update

If your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:

  • 136.113.208.247/32 (new)
  • 34.170.211.100/32
  • 35.222.179.152/32

Reviews will stop working after February 8, 2026 if the new IP is not added to your allowlist.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants