Skip to content

Commit e6778ce

Browse files
committed
apply suggestions after migration
1 parent 8483599 commit e6778ce

File tree

4 files changed

+15
-23
lines changed

4 files changed

+15
-23
lines changed

new-player/src/main/java/net/newpipe/newplayer/logic/AutoStreamSelector.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ internal fun selectStreamAutomatically(
9292

9393
val audioStream = tryAndGetMedianAudioOnlyTracks(availableStreams)
9494

95-
if (videoOnlyStream != null && audioStream != null) {
95+
if (audioStream != null) {
9696
return MultiSelection(listOf(videoOnlyStream, audioStream))
9797
}
9898
} /* if (vdeioOnlyStream != null) */

new-player/src/main/java/net/newpipe/newplayer/service/NewPlayerNotificationCustomCommands.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ internal data class CustomCommand(
5151
internal fun buildCustomCommandList(context: Context) = listOf(
5252
CustomCommand(
5353
CustomCommand.NEW_PLAYER_NOTIFICATION_COMMAND_CLOSE_PLAYBACK,
54-
CommandButton.Builder()
54+
CommandButton.Builder(CommandButton.ICON_UNDEFINED)
5555
.setDisplayName(context.getString(R.string.close))
5656
.setDisplayName("Close")
5757
.setSessionCommand(
@@ -60,7 +60,7 @@ internal fun buildCustomCommandList(context: Context) = listOf(
6060
Bundle()
6161
)
6262
)
63-
.setIconResId(R.drawable.close_24px)
63+
.setCustomIconResId(R.drawable.close_24px)
6464
.build()
6565
)
6666
)

new-player/src/main/java/net/newpipe/newplayer/ui/videoplayer/gesture_ui/FastSeekVisualFeedback.kt

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,12 @@
2020

2121
package net.newpipe.newplayer.ui.videoplayer.gesture_ui
2222

23-
import androidx.compose.animation.AnimatedVisibility
2423
import androidx.compose.animation.animateColor
2524
import androidx.compose.animation.core.LinearEasing
2625
import androidx.compose.animation.core.RepeatMode
2726
import androidx.compose.animation.core.infiniteRepeatable
2827
import androidx.compose.animation.core.keyframes
2928
import androidx.compose.animation.core.rememberInfiniteTransition
30-
import androidx.compose.animation.core.tween
31-
import androidx.compose.animation.fadeIn
32-
import androidx.compose.animation.fadeOut
3329
import androidx.compose.foundation.layout.Box
3430
import androidx.compose.foundation.layout.Column
3531
import androidx.compose.foundation.layout.Row
@@ -41,9 +37,6 @@ import androidx.compose.material3.Surface
4137
import androidx.compose.material3.Text
4238
import androidx.compose.runtime.Composable
4339
import androidx.compose.runtime.getValue
44-
import androidx.compose.runtime.mutableStateOf
45-
import androidx.compose.runtime.remember
46-
import androidx.compose.runtime.setValue
4740
import androidx.compose.ui.Alignment
4841
import androidx.compose.ui.Modifier
4942
import androidx.compose.ui.draw.clip
@@ -53,7 +46,6 @@ import androidx.compose.ui.res.painterResource
5346
import androidx.compose.ui.res.stringResource
5447
import androidx.compose.ui.tooling.preview.Preview
5548
import androidx.compose.ui.unit.dp
56-
import com.google.android.material.color.MaterialColors
5749
import net.newpipe.newplayer.R
5850
import net.newpipe.newplayer.ui.theme.VideoPlayerTheme
5951
import net.newpipe.newplayer.ui.videoplayer.INDICATOR_BACKGROUND_COLOR
@@ -95,8 +87,8 @@ internal fun FastSeekVisualFeedback(modifier: Modifier = Modifier, seconds: Int,
9587
animationSpec = infiniteRepeatable(
9688
animation = keyframes {
9789
durationMillis = SEEK_ANIMATION_DURATION_IN_MS
98-
Color.White.copy(alpha = 1f) at 0 with LinearEasing
99-
Color.White.copy(alpha = 0f) at SEEK_ANIMATION_DURATION_IN_MS with LinearEasing
90+
Color.White.copy(alpha = 1f) at 0 using LinearEasing
91+
Color.White.copy(alpha = 0f) at SEEK_ANIMATION_DURATION_IN_MS using LinearEasing
10092
},
10193
repeatMode = RepeatMode.Restart
10294
), label = "Arrow1 animation"
@@ -108,10 +100,10 @@ internal fun FastSeekVisualFeedback(modifier: Modifier = Modifier, seconds: Int,
108100
animationSpec = infiniteRepeatable(
109101
animation = keyframes {
110102
durationMillis = SEEK_ANIMATION_DURATION_IN_MS
111-
Color.White.copy(alpha = 1f / 3f) at 0 with LinearEasing
112-
Color.White.copy(alpha = 0f) at SEEK_ANIMATION_DURATION_IN_MS / 3 with LinearEasing
113-
Color.White.copy(alpha = 1f) at SEEK_ANIMATION_DURATION_IN_MS / 3 + 1 with LinearEasing
114-
Color.White.copy(alpha = 2f / 3f) at SEEK_ANIMATION_DURATION_IN_MS with LinearEasing
103+
Color.White.copy(alpha = 1f / 3f) at 0 using LinearEasing
104+
Color.White.copy(alpha = 0f) at SEEK_ANIMATION_DURATION_IN_MS / 3 using LinearEasing
105+
Color.White.copy(alpha = 1f) at SEEK_ANIMATION_DURATION_IN_MS / 3 + 1 using LinearEasing
106+
Color.White.copy(alpha = 2f / 3f) at SEEK_ANIMATION_DURATION_IN_MS using LinearEasing
115107
},
116108
repeatMode = RepeatMode.Restart
117109
), label = "Arrow2 animation"
@@ -123,10 +115,10 @@ internal fun FastSeekVisualFeedback(modifier: Modifier = Modifier, seconds: Int,
123115
animationSpec = infiniteRepeatable(
124116
animation = keyframes {
125117
durationMillis = SEEK_ANIMATION_DURATION_IN_MS
126-
Color.White.copy(alpha = 2f / 3f) at 0 with LinearEasing
127-
Color.White.copy(alpha = 0f) at 2 * SEEK_ANIMATION_DURATION_IN_MS / 3 with LinearEasing
128-
Color.White.copy(alpha = 1f) at 2 * SEEK_ANIMATION_DURATION_IN_MS / 3 + 1 with LinearEasing
129-
Color.White.copy(alpha = 2f / 3f) at SEEK_ANIMATION_DURATION_IN_MS with LinearEasing
118+
Color.White.copy(alpha = 2f / 3f) at 0 using LinearEasing
119+
Color.White.copy(alpha = 0f) at 2 * SEEK_ANIMATION_DURATION_IN_MS / 3 using LinearEasing
120+
Color.White.copy(alpha = 1f) at 2 * SEEK_ANIMATION_DURATION_IN_MS / 3 + 1 using LinearEasing
121+
Color.White.copy(alpha = 2f / 3f) at SEEK_ANIMATION_DURATION_IN_MS using LinearEasing
130122
},
131123
repeatMode = RepeatMode.Restart
132124
), label = "Arrow3 animation"

new-player/src/main/java/net/newpipe/newplayer/uiModel/EmbeddedUiConfig.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ import net.newpipe.newplayer.ui.NewPlayerUI
3232
* EmbeddedUiConfig in the [NewPlayerUIState]. When returning from fullscreen mode
3333
* [NewPlayerUI] will then restore that configuration.
3434
*
35-
* TODO: At least in theory. Brightnes and the systembar theme don't work (correctly) right now.
35+
* TODO: At least in theory. Brightness and the system bar theme don't work (correctly) right now.
3636
*
3737
*/
38-
@Parcelize
38+
@kotlinx.parcelize.Parcelize
3939
data class EmbeddedUiConfig(
4040
val systemBarInLightMode: Boolean,
4141
val brightness: Float,

0 commit comments

Comments
 (0)