mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-01-06 01:20:29 +05:30
Added sub and video count translation in the search view
This commit is contained in:
parent
ba740e6b92
commit
af7de7b3c0
@ -1,5 +1,6 @@
|
|||||||
package com.github.libretube.adapters
|
package com.github.libretube.adapters
|
||||||
|
|
||||||
|
import android.content.res.Resources
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
@ -89,7 +90,7 @@ class CustomViewHolder1(private val v: View): RecyclerView.ViewHolder(v){
|
|||||||
val channelName = v.findViewById<TextView>(R.id.search_channel_name)
|
val channelName = v.findViewById<TextView>(R.id.search_channel_name)
|
||||||
channelName.text = item.name
|
channelName.text = item.name
|
||||||
val channelViews = v.findViewById<TextView>(R.id.search_views)
|
val channelViews = v.findViewById<TextView>(R.id.search_views)
|
||||||
channelViews.text = item.subscribers.formatShort() + " subscribers • "+ item.videos + " videos"
|
channelViews.text = v.context.getString(R.string.subscribers, item.subscribers.formatShort()) + " • " + v.context.getString(R.string.videoCount, item.videos.toString())
|
||||||
v.setOnClickListener {
|
v.setOnClickListener {
|
||||||
val activity = v.context as MainActivity
|
val activity = v.context as MainActivity
|
||||||
val bundle = bundleOf("channel_id" to item.url)
|
val bundle = bundleOf("channel_id" to item.url)
|
||||||
|
@ -63,4 +63,5 @@
|
|||||||
<string name="lightTheme">Light Theme</string>
|
<string name="lightTheme">Light Theme</string>
|
||||||
<string name="darkTheme">Dark Theme</string>
|
<string name="darkTheme">Dark Theme</string>
|
||||||
<string name="subscribers">%1$s subscribers</string>
|
<string name="subscribers">%1$s subscribers</string>
|
||||||
|
<string name="videoCount">%1$s videos</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
Reference in New Issue
Block a user