Add missing play button on media gallery page (#1626)

pull/1629/head
Fanchao Liu 8 months ago committed by GitHub
parent 80933938e1
commit 2a438ac24d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -14,16 +14,20 @@ import androidx.compose.foundation.layout.aspectRatio
import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material3.Text import androidx.compose.material3.Text
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color 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.NestedScrollConnection
import androidx.compose.ui.input.nestedscroll.nestedScroll import androidx.compose.ui.input.nestedscroll.nestedScroll
import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.colorResource
import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
@ -34,6 +38,7 @@ import com.bumptech.glide.load.engine.DiskCacheStrategy
import network.loki.messenger.R import network.loki.messenger.R
import org.thoughtcrime.securesms.mms.DecryptableStreamUriLoader import org.thoughtcrime.securesms.mms.DecryptableStreamUriLoader
import org.thoughtcrime.securesms.ui.theme.LocalColors import org.thoughtcrime.securesms.ui.theme.LocalColors
import org.thoughtcrime.securesms.ui.theme.LocalDimensions
import org.thoughtcrime.securesms.ui.theme.LocalType import org.thoughtcrime.securesms.ui.theme.LocalType
import kotlin.math.ceil import kotlin.math.ceil
@ -158,10 +163,21 @@ private fun ThumbnailRow(
when { when {
item.showPlayOverlay -> { item.showPlayOverlay -> {
Image( // The code below is translated from thumbnail_view.xml:
painter = painterResource(R.drawable.ic_baseline_play_circle_filled_48), // Trying to show a green play button on a white background.
contentDescription = null 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 # Define the output paths
build_dir="app/build/outputs/apk/play/debug" 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 # Validate the paths exist
if [ ! -d $build_path ]; then if [ ! -d $build_path ]; then

Loading…
Cancel
Save