fix: hide dislikes if no RYD data available (#4812)

Co-authored-by: Bnyro <82752168+Bnyro@users.noreply.github.com>
This commit is contained in:
FineFindus 2023-09-18 16:24:10 +02:00 committed by GitHub
parent 0b882f77b3
commit 4530b53ddc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 2 deletions

View File

@ -1,7 +1,6 @@
package com.github.libretube.extensions
import android.content.Intent
import android.os.Build
import android.os.Parcelable
import androidx.core.content.IntentCompat
import java.io.Serializable

View File

@ -885,7 +885,9 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
playerViewsInfo.text = getString(R.string.normal_views, views, localizeDate(streams))
textLike.text = streams.likes.formatShort()
textDislike.isVisible = streams.dislikes >= 0
textDislike.text = streams.dislikes.formatShort()
ImageHelper.loadImage(streams.uploaderAvatar, binding.playerChannelImage)
playerChannelName.text = streams.uploader

View File

@ -39,7 +39,6 @@ import com.google.android.material.chip.Chip
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.withContext
class SubscriptionsFragment : Fragment() {
private var _binding: FragmentSubscriptionsBinding? = null

View File

@ -93,6 +93,7 @@
android:drawablePadding="5dp"
app:drawableStartCompat="@drawable/ic_dislike"
app:drawableStartDimen="12dp"
android:visibility="gone"
tools:text="1.3K" />
</LinearLayout>