mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-27 23:40:33 +05:30
feat: display the instance uptime on initial instance selection
This commit is contained in:
parent
c545d744bd
commit
1a5b74cab3
@ -29,13 +29,15 @@ class InstancesAdapter(
|
||||
override fun onBindViewHolder(holder: InstancesViewHolder, position: Int) {
|
||||
val instance = instances[position]
|
||||
holder.binding.apply {
|
||||
var instanceText = "${instance.name} ${instance.locations}"
|
||||
if (instance.cdn) instanceText += " (\uD83C\uDF10 CDN)"
|
||||
var instanceText = "${instance.name} ${instance.locations}"
|
||||
if (instance.cdn) instanceText += " (\uD83C\uDF10 CDN)"
|
||||
if (instance.registrationDisabled) {
|
||||
instanceText +=
|
||||
" (${root.context.getString(R.string.registration_disabled)})"
|
||||
" (${root.context.getString(R.string.registration_disabled)})"
|
||||
}
|
||||
instanceText += ", " + root.context.getString(R.string.uptime, instance.uptimeMonth)
|
||||
radioButton.text = instanceText
|
||||
|
||||
radioButton.setOnCheckedChangeListener(null)
|
||||
radioButton.isChecked = selectedInstanceIndex == position
|
||||
radioButton.setOnCheckedChangeListener { _, isChecked ->
|
||||
|
@ -500,6 +500,7 @@
|
||||
<string name="time_in_minutes">Time in minutes</string>
|
||||
<string name="invalid_input">Invalid input</string>
|
||||
<string name="add_to_group">Add to group</string>
|
||||
<string name="uptime">%.2f%% uptime</string>
|
||||
|
||||
<!-- Notification channel strings -->
|
||||
<string name="download_channel_name">Download Service</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user