deps: switch material to 1.6.0-rc01
Switch material components to the more stable 1.6.0-rc01. Have to deal with android complaining, but whatever.
This commit is contained in:
parent
0d9d6b153b
commit
1e7a439c31
4 changed files with 15 additions and 14 deletions
|
@ -102,7 +102,7 @@ dependencies {
|
|||
implementation "io.coil-kt:coil:2.0.0-rc03"
|
||||
|
||||
// Material
|
||||
implementation "com.google.android.material:material:1.7.0-alpha01"
|
||||
implementation "com.google.android.material:material:1.6.0-rc01"
|
||||
|
||||
// LeakCanary
|
||||
debugImplementation "com.squareup.leakcanary:leakcanary-android:2.9.1"
|
||||
|
|
|
@ -151,7 +151,7 @@ class HomeViewModel : ViewModel(), SettingsManager.Callback, MusicStore.Callback
|
|||
|
||||
override fun onCleared() {
|
||||
super.onCleared()
|
||||
musicStore.addCallback(this)
|
||||
musicStore.removeCallback(this)
|
||||
settingsManager.removeCallback(this)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -64,6 +64,8 @@ import org.oxycblt.auxio.widgets.WidgetProvider
|
|||
* This service relies on [PlaybackStateManager.Callback] and [SettingsManager.Callback], so
|
||||
* therefore there's no need to bind to it to deliver commands.
|
||||
* @author OxygenCobalt
|
||||
*
|
||||
* TODO: Synchronize components in a less awful way.
|
||||
*/
|
||||
class PlaybackService :
|
||||
Service(), Player.Listener, PlaybackStateManager.Callback, SettingsManager.Callback {
|
||||
|
@ -247,19 +249,19 @@ class PlaybackService :
|
|||
}
|
||||
|
||||
private fun onSongChanged(song: Song?) {
|
||||
if (song != null) {
|
||||
logD("Setting player to ${song.rawName}")
|
||||
player.setMediaItem(MediaItem.fromUri(song.uri))
|
||||
player.prepare()
|
||||
notificationComponent.updateMetadata(
|
||||
song, playbackManager.parent, ::startForegroundOrNotify)
|
||||
return
|
||||
}
|
||||
|
||||
if (song == null) {
|
||||
// Clear if there's nothing to play.
|
||||
logD("Nothing playing, stopping playback")
|
||||
player.stop()
|
||||
stopAndSave()
|
||||
return
|
||||
}
|
||||
|
||||
logD("Loading ${song.rawName}")
|
||||
player.setMediaItem(MediaItem.fromUri(song.uri))
|
||||
player.prepare()
|
||||
notificationComponent.updateMetadata(
|
||||
song, playbackManager.parent, ::startForegroundOrNotify)
|
||||
}
|
||||
|
||||
override fun onPlayingChanged(isPlaying: Boolean) {
|
||||
|
|
|
@ -46,8 +46,7 @@ import org.oxycblt.auxio.util.systemBarInsetsCompat
|
|||
* The actual fragment containing the settings menu. Inherits [PreferenceFragmentCompat].
|
||||
* @author OxygenCobalt
|
||||
*
|
||||
* TODO: Add option to restore state
|
||||
* TODO: Add option to not restore state
|
||||
* TODO: Add option to restore state TODO: Add option to not restore state
|
||||
*/
|
||||
@Suppress("UNUSED")
|
||||
class SettingsListFragment : PreferenceFragmentCompat() {
|
||||
|
|
Loading…
Reference in a new issue