mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-05-23 18:16:15 +02:00
feat: add toast feedback to the bundle update button
This commit is contained in:
parent
0b9889ea44
commit
607d8b67c9
@ -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…
x
Reference in New Issue
Block a user