feat: display the instance uptime on initial instance selection

This commit is contained in:
Bnyro 2023-12-17 16:47:34 +01:00
parent c545d744bd
commit 1a5b74cab3
2 changed files with 6 additions and 3 deletions

View File

@ -35,7 +35,9 @@ class InstancesAdapter(
instanceText += 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.text = instanceText
radioButton.setOnCheckedChangeListener(null) radioButton.setOnCheckedChangeListener(null)
radioButton.isChecked = selectedInstanceIndex == position radioButton.isChecked = selectedInstanceIndex == position
radioButton.setOnCheckedChangeListener { _, isChecked -> radioButton.setOnCheckedChangeListener { _, isChecked ->

View File

@ -500,6 +500,7 @@
<string name="time_in_minutes">Time in minutes</string> <string name="time_in_minutes">Time in minutes</string>
<string name="invalid_input">Invalid input</string> <string name="invalid_input">Invalid input</string>
<string name="add_to_group">Add to group</string> <string name="add_to_group">Add to group</string>
<string name="uptime">%.2f%% uptime</string>
<!-- Notification channel strings --> <!-- Notification channel strings -->
<string name="download_channel_name">Download Service</string> <string name="download_channel_name">Download Service</string>