mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2024-11-10 01:01:56 +01:00
feat: add toast feedback to the bundle update button
This commit is contained in:
parent
0b9889ea44
commit
607d8b67c9
2 changed files with 7 additions and 1 deletions
|
@ -10,6 +10,7 @@ import app.revanced.manager.R
|
|||
import app.revanced.manager.domain.bundles.PatchBundleSource
|
||||
import app.revanced.manager.domain.bundles.RemotePatchBundle
|
||||
import app.revanced.manager.domain.repository.PatchBundleRepository
|
||||
import app.revanced.manager.util.toast
|
||||
import app.revanced.manager.util.uiSafe
|
||||
import kotlinx.coroutines.flow.map
|
||||
import kotlinx.coroutines.launch
|
||||
|
@ -53,7 +54,10 @@ class DashboardViewModel(
|
|||
R.string.source_download_fail,
|
||||
RemotePatchBundle.updateFailMsg
|
||||
) {
|
||||
bundle.update()
|
||||
if (bundle.update())
|
||||
app.toast(app.getString(R.string.bundle_update_success, bundle.name))
|
||||
else
|
||||
app.toast(app.getString(R.string.bundle_update_unavailable, bundle.name))
|
||||
}
|
||||
}
|
||||
}
|
|
@ -273,6 +273,8 @@
|
|||
<string name="developer_options_description">Options for debugging issues</string>
|
||||
<string name="bundle_input_name">Name</string>
|
||||
<string name="bundle_input_source_url">Source URL</string>
|
||||
<string name="bundle_update_success">Successfully updated %s</string>
|
||||
<string name="bundle_update_unavailable">No update available for %s</string>
|
||||
<string name="automatically_update">Automatically update</string>
|
||||
<string name="automatically_update_description">Automatically update this bundle when ReVanced starts</string>
|
||||
<string name="bundle_type">Bundle type</string>
|
||||
|
|
Loading…
Reference in a new issue