Mercurial > libervia-desktop-kivy
changeset 444:e578df3304d8
transfer (android gallery): unbind activity_result
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 07 Mar 2020 00:05:50 +0100 |
parents | 61322ff8090b |
children | 9b73a1879989 |
files | cagou/plugins/plugin_transfer_android_gallery.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/cagou/plugins/plugin_transfer_android_gallery.py Sat Mar 07 00:05:50 2020 +0100 +++ b/cagou/plugins/plugin_transfer_android_gallery.py Sat Mar 07 00:05:50 2020 +0100 @@ -46,7 +46,7 @@ } -class AndroidGallery(object): +class AndroidGallery: def __init__(self, callback, cancel_cb): self.callback = callback @@ -58,6 +58,7 @@ mActivity.startActivityForResult(intent, PHOTO_GALLERY); def on_activity_result(self, requestCode, resultCode, data): + activity.unbind(on_activity_result=self.on_activity_result) # TODO: move file dump to a thread or use async callbacks during file writting if requestCode == PHOTO_GALLERY and resultCode == RESULT_OK: if data is None: