mirror of
https://github.com/NiciDieNase/chaosflix
synced 2024-11-26 14:10:23 +00:00
fix warnings
This commit is contained in:
parent
4fba1c852c
commit
24a089874d
4 changed files with 14 additions and 15 deletions
|
@ -13,7 +13,7 @@ data class Room(var slug: String,
|
|||
var link: String,
|
||||
var display: String,
|
||||
var talks: Map<String,StreamEvent>?,
|
||||
var streams: MutableList<Stream?>) : Parcelable {
|
||||
var streams: List<Stream>) : Parcelable {
|
||||
|
||||
|
||||
protected constructor(input: Parcel) : this(
|
||||
|
@ -23,7 +23,7 @@ data class Room(var slug: String,
|
|||
link = input.readString() ?: "",
|
||||
display = input.readString() ?: "",
|
||||
talks = readMap(input),
|
||||
streams = input.createTypedArrayList<Stream>(Stream.CREATOR) ?: emptyList<Stream>().toMutableList())
|
||||
streams = input.createTypedArrayList<Stream>(Stream.CREATOR).filterNotNull())
|
||||
|
||||
|
||||
override fun describeContents(): Int {
|
||||
|
@ -79,7 +79,7 @@ data class Room(var slug: String,
|
|||
"Dummy Room",
|
||||
HashMap(),
|
||||
ArrayList())
|
||||
dummy.streams.add(Stream.dummyObject)
|
||||
dummy.streams = listOf(Stream.dummyObject)
|
||||
return dummy
|
||||
}
|
||||
|
||||
|
|
|
@ -24,15 +24,14 @@ class EventDetailsDescriptionPresenter(private val context: Context) : Presenter
|
|||
}
|
||||
val dataHolder: DetailDataHolder
|
||||
if (item is PersistentEvent) {
|
||||
val persistentEvent = item
|
||||
val sb = StringBuilder()
|
||||
val speaker = TextUtils.join(", ", persistentEvent.persons)
|
||||
sb.append(persistentEvent.description)
|
||||
val speaker = TextUtils.join(", ", item.persons ?: emptyArray())
|
||||
sb.append(item.description)
|
||||
.append("\n")
|
||||
.append("\nreleased at: ").append(persistentEvent.releaseDate)
|
||||
.append("\nTags: ").append(android.text.TextUtils.join(", ", persistentEvent.tags!!))
|
||||
dataHolder = DetailDataHolder(persistentEvent.title,
|
||||
persistentEvent.subtitle,
|
||||
.append("\nreleased at: ").append(item.releaseDate)
|
||||
.append("\nTags: ").append(android.text.TextUtils.join(", ", item.tags!!))
|
||||
dataHolder = DetailDataHolder(item.title,
|
||||
item.subtitle,
|
||||
speaker,
|
||||
sb.toString())
|
||||
} else if (item is Room) {
|
||||
|
|
|
@ -181,10 +181,10 @@ class EventDetailsFragment : DetailsSupportFragment() {
|
|||
setThumb(room.thumb, detailsOverview)
|
||||
initializeBackgroundWithImage(room.thumb)
|
||||
|
||||
val dashStreams = room.streams.filter { it?.slug == "dash-native" }
|
||||
val dashStreams = room.streams.filter { it.slug == "dash-native" }
|
||||
if (dashStreams.size > 0){
|
||||
// && detailsViewModel.getAutoselectStream()) {
|
||||
dashStreams.first()?.urls?.get("dash")?.url?.let { preparePlayer(it, "") }
|
||||
dashStreams.first().urls.get("dash")?.url?.let { preparePlayer(it, "") }
|
||||
}
|
||||
|
||||
val actionAdapter = ArrayObjectAdapter()
|
||||
|
@ -349,13 +349,13 @@ class EventDetailsFragment : DetailsSupportFragment() {
|
|||
fun showWatchlistInfoDialog(preferences: SharedPreferences) {
|
||||
val builder = AlertDialog.Builder(activity)
|
||||
builder.setTitle(R.string.watchlist_message)
|
||||
builder.setNegativeButton(R.string.return_to_homescreen) { dialog, which ->
|
||||
builder.setNegativeButton(R.string.return_to_homescreen) { _, _ ->
|
||||
val i = Intent(activity, ConferencesActivity::class.java)
|
||||
i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
startActivity(i)
|
||||
// getActivity().finish();
|
||||
}
|
||||
builder.setPositiveButton("OK") { dialog, which -> }
|
||||
builder.setPositiveButton("OK") { _, _ -> }
|
||||
val edit = preferences.edit()
|
||||
edit.putBoolean(getString(R.string.watchlist_dialog_needed), false)
|
||||
edit.apply()
|
||||
|
|
|
@ -33,7 +33,7 @@ class OfflineEventAdapter(var items: List<Pair<OfflineEvent, PersistentEvent>>,
|
|||
buttonDelete.setOnClickListener {
|
||||
viewModel.deleteOfflineItem(item.first)
|
||||
}
|
||||
content?.setOnClickListener { view ->
|
||||
content?.setOnClickListener { _ ->
|
||||
listener.onEventSelected(item.second)
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue