Skip to content

Commit

Permalink
fix: artifacts for nightlies not being uploaded
Browse files Browse the repository at this point in the history
* better animations for panels entering and exiting
* use normal font for seekbar timers (was monospaced)
* screen can now sleep if the video is paused
  • Loading branch information
abdallahmehiz committed Aug 20, 2024
1 parent 4690cc1 commit a120ae8
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 10 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/nightlies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,29 +49,29 @@ jobs:
printf "%s\n" "${apks[@]}" | xargs -n 1 -I {} sh -c '
cp app/build/outputs/apk/preview/app-{}-preview-signed.apk mpvKt-{}-r${{ env.COMMIT_COUNT }}.apk
echo "{}=mpv-{}-r${{ env.COMMIT_COUNT}}.apk" >> $GITHUB_ENV'
echo "{}=mpv-{}-r$(echo ${{ env.COMMIT_COUNT }}).apk" >> $GITHUB_ENV'
- name: Upload the APK artifact
- name: Upload the ${{ env.universal }} APK artifact
uses: actions/upload-artifact@v4
with:
path: ${{ env.universal }}
name: ${{ env.universal }}
- name: Upload the APK artifact
- name: Upload the ${{ env.arm64-v8a }} artifact
uses: actions/upload-artifact@v4
with:
path: ${{ env.arm64-v8a }}
name: ${{ env.arm64-v8a }}
- name: Upload the APK artifact
- name: Upload the ${{ env.armeabi-v7a }} artifact
uses: actions/upload-artifact@v4
with:
path: ${{ env.armeabi-v7a }}
name: ${{ env.armeabi-v7a }}
- name: Upload the APK artifact
- name: Upload the ${{ env.x86 }] artifact
uses: actions/upload-artifact@v4
with:
path: ${{ env.x86 }}
name: ${{ env.x86 }}
- name: Upload the APK artifact
- name: Upload the ${{ env.x86_64 }} artifact
uses: actions/upload-artifact@v4
with:
path: ${{ env.x86_64 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,12 @@ class PlayerActivity : AppCompatActivity() {
internal fun onObserverEvent(property: String, value: Boolean) {
when (property) {
"pause" -> {
if (value) viewModel.pause()
if (value) {
viewModel.pause()
window.clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
} else {
window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
}
}

"paused-for-cache" -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package live.mehiz.mpvkt.ui.player.controls

import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.animateColorAsState
import androidx.compose.animation.core.tween
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.animation.graphics.ExperimentalAnimationGraphicsApi
Expand Down Expand Up @@ -94,7 +95,8 @@ fun PlayerControls(
}
}
val transparentOverlay by animateColorAsState(
Color.Black.copy(if (controlsShown) 0.2f else 0f),
Color.Black.copy(if (controlsShown) 0.5f else 0f),
animationSpec = tween(500),
label = "",
)
GestureHandler()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package live.mehiz.mpvkt.ui.player.controls

import androidx.compose.animation.AnimatedContent
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.animation.slideInHorizontally
import androidx.compose.animation.slideOutHorizontally
import androidx.compose.animation.togetherWith
Expand Down Expand Up @@ -34,7 +36,8 @@ fun PlayerPanels(modifier: Modifier = Modifier) {
label = "panels",
contentAlignment = Alignment.CenterEnd,
contentKey = { it.name },
transitionSpec = { slideInHorizontally { it } togetherWith slideOutHorizontally { it } },
transitionSpec = {
fadeIn() + slideInHorizontally { it / 3 } togetherWith fadeOut() + slideOutHorizontally { it / 2 } },
modifier = modifier
) { currentPanel ->
when (currentPanel) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ fun VideoTimer(
.wrapContentHeight(Alignment.CenterVertically),
text = Utils.prettyTime(value.toInt(), isInverted),
color = Color.White,
fontFamily = FontFamily.Monospace,
textAlign = TextAlign.Center,
)
}
Expand Down

0 comments on commit a120ae8

Please sign in to comment.