mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-30 06:32:36 +00:00
Cleaned up some compiler warnings.
This commit is contained in:
parent
47a2abc6cd
commit
50f4551b2c
@ -44,7 +44,7 @@ class PlayQueueActivity : WebSocketActivityBase() {
|
||||
val queryFactory = playback!!.playlistQueryFactory
|
||||
val message: SocketMessage? = queryFactory.getRequeryMessage()
|
||||
|
||||
emptyView = findViewById<EmptyListView>(R.id.empty_list_view)
|
||||
emptyView = findViewById(R.id.empty_list_view)
|
||||
emptyView.capability = EmptyListView.Capability.OfflineOk
|
||||
emptyView.emptyMessage = getString(R.string.play_queue_empty)
|
||||
emptyView.alternateView = recyclerView
|
||||
@ -111,9 +111,9 @@ class PlayQueueActivity : WebSocketActivityBase() {
|
||||
}
|
||||
|
||||
private inner class ViewHolder internal constructor(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||
private val title: TextView = itemView.findViewById<TextView>(R.id.title)
|
||||
private val subtitle: TextView = itemView.findViewById<TextView>(R.id.subtitle)
|
||||
private val trackNum: TextView = itemView.findViewById<TextView>(R.id.track_num)
|
||||
private val title: TextView = itemView.findViewById(R.id.title)
|
||||
private val subtitle: TextView = itemView.findViewById(R.id.subtitle)
|
||||
private val trackNum: TextView = itemView.findViewById(R.id.track_num)
|
||||
|
||||
internal fun bind(entry: JSONObject?, position: Int) {
|
||||
trackNum.text = (position + 1).toString()
|
||||
|
@ -144,8 +144,8 @@ class TrackListActivity : WebSocketActivityBase(), Filterable {
|
||||
}
|
||||
|
||||
private inner class ViewHolder internal constructor(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||
private val title: TextView = itemView.findViewById<TextView>(R.id.title)
|
||||
private val subtitle: TextView = itemView.findViewById<TextView>(R.id.subtitle)
|
||||
private val title: TextView = itemView.findViewById(R.id.title)
|
||||
private val subtitle: TextView = itemView.findViewById(R.id.subtitle)
|
||||
|
||||
internal fun bind(entry: JSONObject?, position: Int) {
|
||||
itemView.tag = position
|
||||
|
@ -40,7 +40,7 @@ class AlbumArtModel(val track: String,
|
||||
}
|
||||
}
|
||||
|
||||
class Image(internal val size: Size, internal val url: String)
|
||||
private class Image(internal val size: Size, internal val url: String)
|
||||
|
||||
init {
|
||||
this.callback = callback ?: DEFAULT_CALLBACK
|
||||
|
@ -44,14 +44,8 @@ class EmptyListView : FrameLayout {
|
||||
}
|
||||
|
||||
var capability: Capability = Capability.OnlineOnly
|
||||
set(value) {
|
||||
field = value
|
||||
}
|
||||
|
||||
var alternateView: View? = null
|
||||
get() {
|
||||
return field
|
||||
}
|
||||
set(value) {
|
||||
field = value
|
||||
alternateView?.visibility = if (visibility == View.GONE) View.VISIBLE else View.GONE
|
||||
@ -94,7 +88,7 @@ class EmptyListView : FrameLayout {
|
||||
offlineContainer = mainView?.findViewById(R.id.offline_container)
|
||||
viewOfflineButton = mainView?.findViewById(R.id.offline_tracks_button)
|
||||
reconnectButton = mainView?.findViewById(R.id.disconnected_button)
|
||||
emptyTextView = mainView?.findViewById<TextView>(R.id.empty_text_view)
|
||||
emptyTextView = mainView?.findViewById(R.id.empty_text_view)
|
||||
|
||||
addView(mainView)
|
||||
|
||||
|
@ -313,19 +313,19 @@ class MainMetadataView : FrameLayout {
|
||||
|
||||
addView(child, ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)
|
||||
|
||||
this.title = findViewById<TextView>(R.id.track_title)
|
||||
this.artist = findViewById<TextView>(R.id.track_artist)
|
||||
this.album = findViewById<TextView>(R.id.track_album)
|
||||
this.volume = findViewById<TextView>(R.id.volume)
|
||||
this.title = findViewById(R.id.track_title)
|
||||
this.artist = findViewById(R.id.track_artist)
|
||||
this.album = findViewById(R.id.track_album)
|
||||
this.volume = findViewById(R.id.volume)
|
||||
this.buffering = findViewById(R.id.buffering)
|
||||
|
||||
this.titleWithArt = findViewById<TextView>(R.id.with_art_track_title)
|
||||
this.artistAndAlbumWithArt = findViewById<TextView>(R.id.with_art_artist_and_album)
|
||||
this.volumeWithArt = findViewById<TextView>(R.id.with_art_volume)
|
||||
this.titleWithArt = findViewById(R.id.with_art_track_title)
|
||||
this.artistAndAlbumWithArt = findViewById(R.id.with_art_artist_and_album)
|
||||
this.volumeWithArt = findViewById(R.id.with_art_volume)
|
||||
|
||||
this.mainTrackMetadataWithAlbumArt = findViewById(R.id.main_track_metadata_with_art)
|
||||
this.mainTrackMetadataNoAlbumArt = findViewById(R.id.main_track_metadata_without_art)
|
||||
this.albumArtImageView = findViewById<ImageView>(R.id.album_art)
|
||||
this.albumArtImageView = findViewById(R.id.album_art)
|
||||
|
||||
this.album.setOnClickListener { _ -> navigateToCurrentAlbum() }
|
||||
this.artist.setOnClickListener { _ -> navigateToCurrentArtist() }
|
||||
|
Loading…
x
Reference in New Issue
Block a user