mirror of
https://github.com/Michatec/Radio.git
synced 2026-05-31 07:02:39 +02:00
feat: implement station navigation and update to SDK 37
- Implement `seekToNext` and `seekToPrevious` in `PlayerService` to allow switching between radio stations. - Update `compileSdk` and `targetSdk` to 37 and bump version to 14.6. - Modify `PlayerService` to remain active while paused to improve playback resumption. - Modernize media resumption logic using Media3 `isRecent` check instead of legacy extras. - Refactor `DefaultRenderersFactory` to use non-nullable `AudioSink` return types. - General code cleanup using KTX extensions (e.g., `View.isEmpty()`) and Kotlin property access syntax.
This commit is contained in:
@@ -11,6 +11,7 @@ import android.widget.FrameLayout
|
||||
import androidx.preference.Preference
|
||||
import androidx.preference.PreferenceViewHolder
|
||||
import com.michatec.radio.R
|
||||
import androidx.core.view.isEmpty
|
||||
|
||||
class ExtrasHelper {
|
||||
companion object {
|
||||
@@ -69,7 +70,7 @@ class ExtrasHelper {
|
||||
if (currentParent != container) {
|
||||
currentParent?.removeView(visualizerView)
|
||||
// If we injected into a standard preference, don't clear everything, just add
|
||||
if (container is FrameLayout || container.childCount == 0) {
|
||||
if (container is FrameLayout || container.isEmpty()) {
|
||||
container.removeAllViews()
|
||||
}
|
||||
container.addView(visualizerView)
|
||||
|
||||
Reference in New Issue
Block a user