mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
removed "Provider" from extension name (#97)
* remove "Provider" from extension name
This commit is contained in:
parent
5b67bde06a
commit
9383a2d176
2 changed files with 4 additions and 3 deletions
|
@ -135,6 +135,7 @@ class PluginAdapter(
|
|||
) {
|
||||
val metadata = data.plugin.second
|
||||
val disabled = metadata.status == PROVIDER_STATUS_DOWN
|
||||
val name = metadata.name.removeSuffix("Provider")
|
||||
val alpha = if (disabled) 0.6f else 1f
|
||||
val isLocal = !data.plugin.second.url.startsWith("http")
|
||||
itemView.main_text?.alpha = alpha
|
||||
|
@ -177,7 +178,7 @@ class PluginAdapter(
|
|||
} catch (e: Throwable) {
|
||||
Log.e(
|
||||
"PluginAdapter",
|
||||
"Failed to open ${metadata.name} settings: ${
|
||||
"Failed to open $name settings: ${
|
||||
Log.getStackTraceString(e)
|
||||
}"
|
||||
)
|
||||
|
@ -235,7 +236,7 @@ class PluginAdapter(
|
|||
} else {
|
||||
itemView.ext_filesize?.isVisible = false
|
||||
}
|
||||
itemView.main_text.setText(if(disabled) txt(R.string.single_plugin_disabled, metadata.name) else txt(metadata.name))
|
||||
itemView.main_text.setText(if(disabled) txt(R.string.single_plugin_disabled, name) else txt(name))
|
||||
itemView.sub_text?.isGone = metadata.description.isNullOrBlank()
|
||||
itemView.sub_text?.text = metadata.description.html()
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ class PluginDetailsFragment(val data: PluginViewData) : BottomSheetDialogFragmen
|
|||
) {
|
||||
plugin_icon?.setImageResource(R.drawable.ic_baseline_extension_24)
|
||||
}
|
||||
plugin_name?.text = metadata.name
|
||||
plugin_name?.text = metadata.name.removeSuffix("Provider")
|
||||
plugin_version?.text = metadata.version.toString()
|
||||
plugin_description?.text = metadata.description ?: getString(R.string.no_data)
|
||||
plugin_size?.text = if (metadata.fileSize == null) getString(R.string.no_data) else formatFileSize(context, metadata.fileSize)
|
||||
|
|
Loading…
Reference in a new issue