[PR #447] [MERGED] fix(linux-rust): Clear stale tray battery on device switch #402

Closed
opened 2026-03-02 12:41:03 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/kavishdevar/librepods/pull/447
Author: @Ryder-C
Created: 2/4/2026
Status: Merged
Merged: 2/10/2026
Merged by: @kavishdevar

Base: linux/rustHead: fix/tray-stale-battery


📝 Commits (1)

  • 2f14d74 fix(linux-rust): Clear stale tray battery on device switch

📊 Changes

1 file changed (+11 additions, -1 deletions)

View changed files

📝 linux-rust/src/devices/airpods.rs (+11 -1)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/kavishdevar/librepods/pull/447 **Author:** [@Ryder-C](https://github.com/Ryder-C) **Created:** 2/4/2026 **Status:** ✅ Merged **Merged:** 2/10/2026 **Merged by:** [@kavishdevar](https://github.com/kavishdevar) **Base:** `linux/rust` ← **Head:** `fix/tray-stale-battery` --- ### 📝 Commits (1) - [`2f14d74`](https://github.com/kavishdevar/librepods/commit/2f14d74fbd4cb1f304e2657f115cf9869533bf77) fix(linux-rust): Clear stale tray battery on device switch ### 📊 Changes **1 file changed** (+11 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `linux-rust/src/devices/airpods.rs` (+11 -1) </details> ### 📄 Description ### 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 12:41:03 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librepods#402
No description provided.