mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-29 21:27:40 +00:00
When permissions are granted, reload plugins for all devices
This commit is contained in:
parent
6b1b12a178
commit
ae98b5c71f
@ -329,7 +329,7 @@ class MainActivity : AppCompatActivity(), OnSharedPreferenceChangeListener {
|
|||||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||||
when {
|
when {
|
||||||
requestCode == RESULT_NEEDS_RELOAD -> {
|
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 -> {
|
requestCode == STORAGE_LOCATION_CONFIGURED && resultCode == RESULT_OK && data != null -> {
|
||||||
val uri = data.data
|
val uri = data.data
|
||||||
@ -363,7 +363,7 @@ class MainActivity : AppCompatActivity(), OnSharedPreferenceChangeListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//New permission granted, reload plugins
|
//New permission granted, reload plugins
|
||||||
KdeConnect.getInstance().getDevice(mCurrentDevice)?.reloadPluginsFromSettings()
|
KdeConnect.getInstance().devices.values.forEach(Device::reloadPluginsFromSettings)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user