mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
two buttons
This commit is contained in:
parent
f89aad3e95
commit
18c600faf2
2 changed files with 11 additions and 12 deletions
|
@ -431,16 +431,15 @@ object AppUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Activity.addRepositoryDialog(repositoryName: String, isExtensionsFragment: Boolean) {
|
fun Activity.addRepositoryDialog(repositoryName: String, isExtensionsFragment: Boolean) {
|
||||||
val message = String.format(resources.getString(
|
|
||||||
R.string.download_all_plugins_from_repo), repositoryName)
|
|
||||||
val repos = RepositoryManager.getRepositories()
|
val repos = RepositoryManager.getRepositories()
|
||||||
|
|
||||||
// navigate to newly added repository on pressing OK
|
// navigate to newly added repository on pressing Open Repository
|
||||||
fun openAddedRepo() {
|
fun openAddedRepo() {
|
||||||
|
|
||||||
// don't redirect if user is adding from add repo button
|
// don't redirect if user is adding manually from add repository fab button
|
||||||
if (!isExtensionsFragment && repos.isNotEmpty()) {
|
if (!isExtensionsFragment && repos.isNotEmpty()) {
|
||||||
normalSafeApiCall { navigate(
|
normalSafeApiCall {
|
||||||
|
navigate(
|
||||||
R.id.navigation_home_to_navigation_settings_plugins,
|
R.id.navigation_home_to_navigation_settings_plugins,
|
||||||
PluginsFragment.newInstance(
|
PluginsFragment.newInstance(
|
||||||
repositoryName,
|
repositoryName,
|
||||||
|
@ -451,14 +450,13 @@ object AppUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
runOnUiThread {
|
runOnUiThread {
|
||||||
val builder : AlertDialog.Builder = AlertDialog.Builder(this)
|
AlertDialog.Builder(this).apply {
|
||||||
builder.apply {
|
|
||||||
setTitle(repositoryName)
|
setTitle(repositoryName)
|
||||||
setMessage(message)
|
setMessage(R.string.download_all_plugins_from_repo)
|
||||||
setPositiveButton(R.string.ok) { _, _ ->
|
setPositiveButton(R.string.open_downloaded_repo) { _, _ ->
|
||||||
openAddedRepo()
|
openAddedRepo()
|
||||||
}
|
}
|
||||||
setCancelable(false)
|
setNegativeButton(R.string.dismiss, null)
|
||||||
show().setDefaultFocus()
|
show().setDefaultFocus()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -609,8 +609,7 @@
|
||||||
<string name="view_public_repositories_button">View community repositories</string>
|
<string name="view_public_repositories_button">View community repositories</string>
|
||||||
<string name="view_public_repositories_button_short">Public list</string>
|
<string name="view_public_repositories_button_short">Public list</string>
|
||||||
<string name="uppercase_all_subtitles">Uppercase all subtitles</string>
|
<string name="uppercase_all_subtitles">Uppercase all subtitles</string>
|
||||||
<string name="download_all_plugins_from_repo">%1$s has been added. You can install your desired extensions from 𝗦𝗲𝘁𝘁𝗶𝗻𝗴𝘀 > 𝗘𝘅𝘁𝗲𝗻𝘀𝗶𝗼𝗻𝘀 > %1$s.
|
<string name="download_all_plugins_from_repo">CloudStream 3 does not takes any responsibility for using 3rd-party extensions neither provides support for them</string>
|
||||||
CloudStream 3 does not takes any responsibility for using third-party extensions neither provides support for them.</string>
|
|
||||||
<string name="single_plugin_disabled" formatted="true">%s (Disabled)</string>
|
<string name="single_plugin_disabled" formatted="true">%s (Disabled)</string>
|
||||||
<string name="tracks">Tracks</string>
|
<string name="tracks">Tracks</string>
|
||||||
<string name="audio_tracks">Audio tracks</string>
|
<string name="audio_tracks">Audio tracks</string>
|
||||||
|
@ -659,6 +658,8 @@
|
||||||
<string name="yes">Yes</string>
|
<string name="yes">Yes</string>
|
||||||
<string name="no">No</string>
|
<string name="no">No</string>
|
||||||
<string name="ok">OK</string>
|
<string name="ok">OK</string>
|
||||||
|
<string name="dismiss">Dismiss</string>
|
||||||
|
<string name="open_downloaded_repo">Open repository</string>
|
||||||
<string name="battery_dialog_title">Disable Battery optimization</string>
|
<string name="battery_dialog_title">Disable Battery optimization</string>
|
||||||
<string name="battery_dialog_message">To ensure uninterrupted downloads and notifications for subscribed
|
<string name="battery_dialog_message">To ensure uninterrupted downloads and notifications for subscribed
|
||||||
TV shows, CloudStream needs permission to run in background. By pressing "OK", you\'ll be directed to App info.
|
TV shows, CloudStream needs permission to run in background. By pressing "OK", you\'ll be directed to App info.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue