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