mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-13 13:50:30 +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
|
||||
|
||||
import android.content.res.Resources
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
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)
|
||||
channelName.text = item.name
|
||||
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 {
|
||||
val activity = v.context as MainActivity
|
||||
val bundle = bundleOf("channel_id" to item.url)
|
||||
|
@ -63,4 +63,5 @@
|
||||
<string name="lightTheme">Light Theme</string>
|
||||
<string name="darkTheme">Dark Theme</string>
|
||||
<string name="subscribers">%1$s subscribers</string>
|
||||
<string name="videoCount">%1$s videos</string>
|
||||
</resources>
|
||||
|
Loading…
Reference in New Issue
Block a user