Merge branch 'libre-tube:master' into master

This commit is contained in:
XelXen 2022-06-28 11:20:26 +05:30 committed by GitHub
commit a02a0cb2ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 49 additions and 24 deletions

View File

@ -565,6 +565,7 @@ class PlayerFragment : Fragment() {
context?.getString(R.string.views, response.views.formatShort()) +
"" + response.uploadDate
view.findViewById<TextView>(R.id.textLike).text = response.likes.formatShort()
view.findViewById<TextView>(R.id.textDislike).text = response.dislikes.formatShort()
val channelImage = view.findViewById<ImageView>(R.id.player_channelImage)
Picasso.get().load(response.uploaderAvatar).into(channelImage)
view.findViewById<TextView>(R.id.player_channelName).text = response.uploader

View File

@ -20,7 +20,7 @@ data class Streams(
val duration: Int?,
val views: Long?,
val likes: Long?,
val dislikes: Int?,
val dislikes: Long?,
val audioStreams: List<PipedStream>?,
val videoStreams: List<PipedStream>?,
val relatedStreams: List<StreamItem>?,
@ -44,7 +44,7 @@ data class Streams(
parcel.readValue(Int::class.java.classLoader) as? Int,
parcel.readValue(Long::class.java.classLoader) as? Long,
parcel.readValue(Long::class.java.classLoader) as? Long,
parcel.readValue(Int::class.java.classLoader) as? Int,
parcel.readValue(Int::class.java.classLoader) as? Long,
TODO("audioStreams"),
TODO("videoStreams"),
TODO("relatedStreams"),

View File

@ -62,12 +62,55 @@
android:layout_marginTop="5dp"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/player_views_info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="10M views 2 days ago " />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="3dp"
android:layout_marginTop="2dp">
<ImageView
android:layout_gravity="center"
android:layout_width="15dp"
android:layout_height="15dp"
android:src="@drawable/ic_like" />
<TextView
android:id="@+id/textLike"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="5dp"
android:text="4.2K" />
<ImageView
android:layout_gravity="center"
android:layout_width="15dp"
android:layout_height="15dp"
android:layout_marginLeft="5dp"
android:src="@drawable/ic_like"
android:rotation="180"/>
<TextView
android:id="@+id/textDislike"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="5dp"
android:text="1.3K" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/chapters_toggle"
android:layout_width="wrap_content"
@ -131,25 +174,6 @@
android:gravity="center"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight=".25"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:layout_width="24dp"
android:layout_height="25dp"
android:src="@drawable/ic_like" />
<TextView
android:id="@+id/textLike"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="4.2K" />
</LinearLayout>
<LinearLayout
android:id="@+id/relPlayer_share"
android:layout_width="0dp"