Skip to content

Commit

Permalink
Indicate live stream in info panel
Browse files Browse the repository at this point in the history
  • Loading branch information
arkon committed May 25, 2024
1 parent 0e0b137 commit 5d6e4ff
Showing 1 changed file with 26 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
package com.livetl.android.ui.screen.player.composable

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import com.livetl.android.R
import com.livetl.android.data.stream.StreamInfo
import com.livetl.android.ui.common.StreamThumbnailBackground

Expand All @@ -36,10 +43,25 @@ fun StreamInfoPanel(streamInfo: StreamInfo?, modifier: Modifier = Modifier) {
style = MaterialTheme.typography.titleLarge,
)

Text(
text = streamInfo.author,
style = MaterialTheme.typography.bodyMedium,
)
Row(
horizontalArrangement = Arrangement.spacedBy(8.dp),
) {
Text(
text = streamInfo.author,
style = MaterialTheme.typography.bodyMedium,
)

if (streamInfo.isLive) {
Text(
text = stringResource(R.string.live).uppercase(),
style = MaterialTheme.typography.bodyMedium,
modifier = Modifier
.clip(RoundedCornerShape(4.dp))
.background(color = Color(0xE6CC0000))
.padding(horizontal = 2.dp),
)
}
}
}
}
}

0 comments on commit 5d6e4ff

Please sign in to comment.