formatting

This commit is contained in:
Felix 2020-04-10 17:02:07 +02:00
parent c2be295029
commit 8a300232b7
3 changed files with 4 additions and 7 deletions

View file

@ -152,7 +152,7 @@ class ChaosflixSeekDataProvider(
} ?: Bitmap.createBitmap(THUMB_WIDTH, THUMB_HEIGHT, Bitmap.Config.ARGB_8888)
} catch (ex: Exception) {
Log.e(TAG, "Error: ${ex.message}", ex)
return Bitmap.createBitmap(10,10, Bitmap.Config.RGB_565)
return Bitmap.createBitmap(10, 10, Bitmap.Config.RGB_565)
}
Log.d(TAG, "Thumb size: ${thumb.width}x${thumb.height}")
@ -170,7 +170,7 @@ class ChaosflixSeekDataProvider(
val s = seconds % 60
val m = (seconds / 60) % 60
val h = seconds / 3600
return if(h > 0){
return if (h > 0) {
String.format("%d:%02d:%02d", h, m, s)
} else {
String.format("%d:%02d", m, s)

View file

@ -20,9 +20,9 @@ class DetailsActivity : androidx.fragment.app.FragmentActivity() {
public override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_event_details)
val fragment = when(intent.getIntExtra(TYPE, 0)) {
val fragment = when (intent.getIntExtra(TYPE, 0)) {
TYPE_RECORDING -> EventDetailsFragment().apply {
arguments = bundleOf(EVENT to intent.getParcelableExtra<Event>(EVENT) )
arguments = bundleOf(EVENT to intent.getParcelableExtra<Event>(EVENT))
}
TYPE_STREAM -> StreamDetailsFragment().apply {
arguments = bundleOf(ROOM to intent.getParcelableExtra<Room>(ROOM))

View file

@ -55,8 +55,6 @@ import de.nicidienase.chaosflix.common.viewmodel.PlayerViewModel
import de.nicidienase.chaosflix.common.viewmodel.ViewModelFactory
import de.nicidienase.chaosflix.leanback.ItemViewClickedListener
import de.nicidienase.chaosflix.leanback.R
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
class StreamDetailsFragment : DetailsSupportFragment() {
@ -298,6 +296,5 @@ class StreamDetailsFragment : DetailsSupportFragment() {
}
}
}
}
}