2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-29 13:17:43 +00:00

When permissions are granted, reload plugins for all devices

This commit is contained in:
Albert Vaca Cintora 2023-09-01 05:47:18 +02:00
parent 6b1b12a178
commit ae98b5c71f

View File

@ -329,7 +329,7 @@ class MainActivity : AppCompatActivity(), OnSharedPreferenceChangeListener {
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
when {
requestCode == RESULT_NEEDS_RELOAD -> {
KdeConnect.getInstance().getDevice(mCurrentDevice)?.reloadPluginsFromSettings()
KdeConnect.getInstance().devices.values.forEach(Device::reloadPluginsFromSettings)
}
requestCode == STORAGE_LOCATION_CONFIGURED && resultCode == RESULT_OK && data != null -> {
val uri = data.data
@ -363,7 +363,7 @@ class MainActivity : AppCompatActivity(), OnSharedPreferenceChangeListener {
}
//New permission granted, reload plugins
KdeConnect.getInstance().getDevice(mCurrentDevice)?.reloadPluginsFromSettings()
KdeConnect.getInstance().devices.values.forEach(Device::reloadPluginsFromSettings)
}
}