Skip to content

refactor(player): clean up track transitions and stop notification foreground loop - #30

Open
vrdons wants to merge 2 commits into
maxrave-dev:multiplatformfrom
vrdons:multiplatform
Open

vrdons wants to merge 2 commits into
maxrave-dev:multiplatformfrom
vrdons:multiplatform

Conversation

@vrdons

@vrdons vrdons commented Sep 3, 2026

Copy link
Copy Markdown

Fixes background CPU cooking from notification loops and cleans up track loading logic

Eh nothing more you can see on commits

* Spawning an endless 30 second loop on every notification update was
leaking dozens of wakeups. That cooks CPU for no reason.

Call startForeground directly inside onNotificationPosted instead of
running recurring background loops.
…ossfadeExoPlayerAdapter

* Use playlist.getOrNull() for safe indexing instead of checking bounds manually.
* Streamline player resolution (precached vs fresh instance) with a destructuring pair.
* Replace raw try-catch on old player release with runCatching.
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.

1 participant