Skip to content

Commit 947014e

Browse files
Refresh tree view after UPLOAD and DELETE operations
1 parent c20d7d7 commit 947014e

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

addons/android_device_explorer/device_explorer.gd

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,9 @@ func _push(local_path: String, remote_path: String) -> void:
325325
var cp_cmd = "cp -r '%s' '%s'" % [temp_path, exact_remote_path]
326326
_run_adb(["shell", "run-as", PACKAGE_NAME, cp_cmd])
327327
_run_adb(["shell", "rm", "-rf", temp_path])
328+
329+
# Finally refresh the tree view to show newly uploaded file
330+
_on_dir_expanded(tree.get_selected(), true)
328331

329332

330333
func _delete(remote_path: String) -> void:
@@ -334,6 +337,9 @@ func _delete(remote_path: String) -> void:
334337
print(a)
335338
else:
336339
_run_adb(["shell", delete_cmd])
340+
341+
# Finally refresh the tree view
342+
_on_dir_expanded(tree.get_selected().get_parent(), true)
337343

338344
#---------------------------------------------------------------------------------------------------
339345

0 commit comments

Comments
 (0)