mirror of
https://github.com/NiciDieNase/chaosflix
synced 2024-11-25 22:00:16 +00:00
Supress PreviewBuider Error
This commit is contained in:
parent
5266582d5e
commit
c9fce1efa3
2 changed files with 4 additions and 2 deletions
|
@ -28,7 +28,7 @@ class EventsActivity : androidx.fragment.app.FragmentActivity() {
|
|||
public override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
val conf = intent.getParcelableExtra<Conference>(CONFERENCE)
|
||||
if(conf != null){
|
||||
if( conf != null ){
|
||||
conference = conf
|
||||
} else {
|
||||
finish()
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package de.nicidienase.chaosflix.leanback.recommendations
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.ContentResolver
|
||||
import android.content.ContentUris
|
||||
import android.content.Context
|
||||
|
@ -75,7 +76,7 @@ class ChannelManager(
|
|||
return events.filterNot { activeOrDismissedRecommendations.contains(it.guid) }.map {
|
||||
publishEvent(channelId, it, contentResolver).apply {
|
||||
val sec = this.second
|
||||
if(sec != null){
|
||||
if( sec != null ){
|
||||
mediaRepository.setRecommendationIdForEvent(this.first, sec, channel.name)
|
||||
}
|
||||
}
|
||||
|
@ -97,6 +98,7 @@ class ChannelManager(
|
|||
return event to programUri?.let { ContentUris.parseId(it) }
|
||||
}
|
||||
|
||||
@SuppressLint("RestrictedApi")
|
||||
private fun eventToBuilder(channelId: Long, event: Event): PreviewProgram.Builder {
|
||||
return PreviewProgram.Builder()
|
||||
.setChannelId(channelId)
|
||||
|
|
Loading…
Reference in a new issue