fix layout

This commit is contained in:
Bnyro 2022-08-26 19:09:09 +02:00
parent 2151fd2dc9
commit a75d8f7225
4 changed files with 16 additions and 10 deletions

View File

@ -604,8 +604,10 @@ class PlayerFragment : BaseFragment() {
context.getString(R.string.none) context.getString(R.string.none)
} }
// set the playback speed // set the playback speed
currentPlaybackSpeed = "${exoPlayer.playbackParameters.speed.toString() currentPlaybackSpeed = "${
.replace(".0", "")}x" exoPlayer.playbackParameters.speed.toString()
.replace(".0", "")
}x"
// set the quality text // set the quality text
val isAdaptive = exoPlayer.videoFormat?.codecs != null val isAdaptive = exoPlayer.videoFormat?.codecs != null
val quality = exoPlayer.videoSize.height val quality = exoPlayer.videoSize.height

View File

@ -163,14 +163,18 @@ class SubscriptionsFragment : BaseFragment() {
"4" "4"
).toInt() ).toInt()
) )
} else LinearLayoutManager(context) } else {
LinearLayoutManager(context)
}
// set the adapter of the subscribed channels // set the adapter of the subscribed channels
binding.subChannels.adapter = if (legacySubscriptions) { binding.subChannels.adapter = if (legacySubscriptions) {
LegacySubscriptionAdapter(viewModel.subscriptions.value!!) LegacySubscriptionAdapter(viewModel.subscriptions.value!!)
} else SubscriptionChannelAdapter( } else {
viewModel.subscriptions.value!!.toMutableList() SubscriptionChannelAdapter(
) viewModel.subscriptions.value!!.toMutableList()
)
}
binding.subFeedContainer.visibility = View.GONE binding.subFeedContainer.visibility = View.GONE
binding.subChannelsContainer.visibility = binding.subChannelsContainer.visibility =

View File

@ -26,7 +26,8 @@ import java.util.concurrent.TimeUnit
class NotificationHelper( class NotificationHelper(
private val context: Context private val context: Context
) { ) {
val NotificationManager = context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager val NotificationManager =
context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
// the id where notification channels start // the id where notification channels start
private var notificationId = NotificationManager.activeNotifications.size + 5 private var notificationId = NotificationManager.activeNotifications.size + 5

View File

@ -15,8 +15,9 @@
<HorizontalScrollView <HorizontalScrollView
android:id="@+id/filter_bar" android:id="@+id/filter_bar"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingHorizontal="10dp"
android:scrollbars="none" android:scrollbars="none"
app:layout_constraintBottom_toTopOf="@id/recycler_view" app:layout_constraintBottom_toTopOf="@id/recycler_view"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
@ -27,8 +28,6 @@
android:id="@+id/filter_chip_group" android:id="@+id/filter_chip_group"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingStart="8dp"
android:paddingEnd="8dp"
app:checkedChip="@id/chip_all" app:checkedChip="@id/chip_all"
app:selectionRequired="true" app:selectionRequired="true"
app:singleLine="true" app:singleLine="true"