diff --git a/app/src/main/java/code/name/monkey/retromusic/activities/GenreDetailsActivity.kt b/app/src/main/java/code/name/monkey/retromusic/activities/GenreDetailsActivity.kt index b305c3d8..019646ac 100644 --- a/app/src/main/java/code/name/monkey/retromusic/activities/GenreDetailsActivity.kt +++ b/app/src/main/java/code/name/monkey/retromusic/activities/GenreDetailsActivity.kt @@ -12,6 +12,7 @@ import code.name.monkey.retromusic.R import code.name.monkey.retromusic.activities.base.AbsSlidingMusicPanelActivity import code.name.monkey.retromusic.adapter.song.ShuffleButtonSongAdapter import code.name.monkey.retromusic.extensions.applyToolbar +import code.name.monkey.retromusic.extensions.extraNotNull import code.name.monkey.retromusic.helper.menu.GenreMenuHelper import code.name.monkey.retromusic.interfaces.CabHolder import code.name.monkey.retromusic.model.Genre @@ -61,11 +62,8 @@ class GenreDetailsActivity : AbsSlidingMusicPanelActivity(), CabHolder, GenreDet setTaskDescriptionColorAuto() setLightNavigationBar(true) setBottomBarVisibility(View.GONE) - if (intent.extras != null) { - genre = intent?.extras?.getParcelable(EXTRA_GENRE_ID)!! - } else { - finish() - } + + genre = extraNotNull(EXTRA_GENRE_ID).value setUpToolBar() setupRecyclerView() diff --git a/app/src/main/java/code/name/monkey/retromusic/activities/PlaylistDetailActivity.kt b/app/src/main/java/code/name/monkey/retromusic/activities/PlaylistDetailActivity.kt index e4b569cc..099817f0 100644 --- a/app/src/main/java/code/name/monkey/retromusic/activities/PlaylistDetailActivity.kt +++ b/app/src/main/java/code/name/monkey/retromusic/activities/PlaylistDetailActivity.kt @@ -13,6 +13,7 @@ import code.name.monkey.retromusic.adapter.song.OrderablePlaylistSongAdapter import code.name.monkey.retromusic.adapter.song.PlaylistSongAdapter import code.name.monkey.retromusic.adapter.song.SongAdapter import code.name.monkey.retromusic.extensions.applyToolbar +import code.name.monkey.retromusic.extensions.extraNotNull import code.name.monkey.retromusic.helper.menu.PlaylistMenuHelper import code.name.monkey.retromusic.interfaces.CabHolder import code.name.monkey.retromusic.loaders.PlaylistLoader @@ -54,11 +55,7 @@ class PlaylistDetailActivity : AbsSlidingMusicPanelActivity(), CabHolder, Playli presenter = PlaylistSongsPresenterImpl(RepositoryImpl(this)) presenter.attachView(this) - if (intent.extras != null) { - playlist = intent.extras!!.getParcelable(EXTRA_PLAYLIST)!! - } else { - finish() - } + playlist = extraNotNull(EXTRA_PLAYLIST).value setUpToolBar() setUpRecyclerView() diff --git a/app/src/main/res/xml/app_widget_classic_info.xml b/app/src/main/res/xml/app_widget_classic_info.xml index 9d4e3eaf..6aff4feb 100755 --- a/app/src/main/res/xml/app_widget_classic_info.xml +++ b/app/src/main/res/xml/app_widget_classic_info.xml @@ -4,8 +4,8 @@ android:initialLayout="@layout/app_widget_classic" android:minWidth="@dimen/app_widget_classic_min_width" android:minHeight="@dimen/app_widget_classic_min_height" + android:previewImage="@drawable/widget_classic" android:resizeMode="horizontal|vertical" android:updatePeriodMillis="0" - android:previewImage="@drawable/widget_classic" android:widgetCategory="keyguard|home_screen" tools:ignore="UnusedAttribute" /> \ No newline at end of file