mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 00:37:47 +00:00
Add missing play button on media gallery page (#1626)
This commit is contained in:
parent
80933938e1
commit
2a438ac24d
@ -14,16 +14,20 @@ import androidx.compose.foundation.layout.aspectRatio
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.lazy.LazyColumn
|
||||
import androidx.compose.foundation.shape.CircleShape
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.ColorFilter
|
||||
import androidx.compose.ui.input.nestedscroll.NestedScrollConnection
|
||||
import androidx.compose.ui.input.nestedscroll.nestedScroll
|
||||
import androidx.compose.ui.layout.ContentScale
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.colorResource
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
@ -34,6 +38,7 @@ import com.bumptech.glide.load.engine.DiskCacheStrategy
|
||||
import network.loki.messenger.R
|
||||
import org.thoughtcrime.securesms.mms.DecryptableStreamUriLoader
|
||||
import org.thoughtcrime.securesms.ui.theme.LocalColors
|
||||
import org.thoughtcrime.securesms.ui.theme.LocalDimensions
|
||||
import org.thoughtcrime.securesms.ui.theme.LocalType
|
||||
import kotlin.math.ceil
|
||||
|
||||
@ -158,10 +163,21 @@ private fun ThumbnailRow(
|
||||
|
||||
when {
|
||||
item.showPlayOverlay -> {
|
||||
Image(
|
||||
painter = painterResource(R.drawable.ic_baseline_play_circle_filled_48),
|
||||
contentDescription = null
|
||||
)
|
||||
// The code below is translated from thumbnail_view.xml:
|
||||
// Trying to show a green play button on a white background.
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.size(48.dp)
|
||||
.background(Color.White, shape = CircleShape),
|
||||
contentAlignment = Alignment.Center,
|
||||
) {
|
||||
Image(
|
||||
modifier = Modifier.padding(start = LocalDimensions.current.xxxsSpacing),
|
||||
painter = painterResource(R.drawable.triangle_right),
|
||||
contentDescription = null,
|
||||
colorFilter = ColorFilter.tint(LocalColors.current.primary)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ chmod 600 ssh_key
|
||||
|
||||
# Define the output paths
|
||||
build_dir="app/build/outputs/apk/play/debug"
|
||||
target_path="${build_dir}/$(ls ${build_dir} | grep -o 'session-[^[:space:]]*-universal.apk')"
|
||||
target_path="${build_dir}/$(ls ${build_dir} | grep -o 'app-[^[:space:]]*-universal-debug.apk')"
|
||||
|
||||
# Validate the paths exist
|
||||
if [ ! -d $build_path ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user