Code refactor

main
Hemanth S 2020-07-09 11:58:12 +05:30
parent 0f8b64534f
commit 5f3434715b
3 changed files with 6 additions and 11 deletions

View File

@ -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<Genre>(EXTRA_GENRE_ID).value
setUpToolBar()
setupRecyclerView()

View File

@ -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<Playlist>(EXTRA_PLAYLIST).value
setUpToolBar()
setUpRecyclerView()

View File

@ -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" />