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

Commit 183b4079 authored by Matt Pietal's avatar Matt Pietal
Browse files

Media - Fix old players being left around

In addressing sorting, the oldKey was removed but it prevented the
actual player view from being removed. Let the downstream code handle
oldKey -> key migration during resumption scenarios

Fixes: 161031927
Test: atest MediaPlayerDataTest
Change-Id: I937a2732615225235bf1103a2bba0170d3e0b905
parent 9b936999
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -172,7 +172,6 @@ class MediaCarouselController @Inject constructor(
                    // This view is inactive, let's remove this! This happens e.g when dismissing /
                    // timing out a view. We still have the data around because resumption could
                    // be on, but we should save the resources and release this.
                    oldKey?.let { MediaPlayerData.removeMediaPlayer(it) }
                    onMediaDataRemoved(key)
                } else {
                    addOrUpdatePlayer(key, oldKey, data)