mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-02 18:25:21 +00:00
fix #4238
This commit is contained in:
parent
ee2a1f52a1
commit
35b3294a5d
1 changed files with 9 additions and 6 deletions
|
@ -400,12 +400,15 @@ class ElectrumWindow(App):
|
|||
intent = Intent(PythonActivity.mActivity, SimpleScannerActivity)
|
||||
|
||||
def on_qr_result(requestCode, resultCode, intent):
|
||||
if resultCode == -1: # RESULT_OK:
|
||||
# this doesn't work due to some bug in jnius:
|
||||
# contents = intent.getStringExtra("text")
|
||||
String = autoclass("java.lang.String")
|
||||
contents = intent.getStringExtra(String("text"))
|
||||
on_complete(contents)
|
||||
try:
|
||||
if resultCode == -1: # RESULT_OK:
|
||||
# this doesn't work due to some bug in jnius:
|
||||
# contents = intent.getStringExtra("text")
|
||||
String = autoclass("java.lang.String")
|
||||
contents = intent.getStringExtra(String("text"))
|
||||
on_complete(contents)
|
||||
finally:
|
||||
activity.unbind(on_activity_result=on_qr_result)
|
||||
activity.bind(on_activity_result=on_qr_result)
|
||||
PythonActivity.mActivity.startActivityForResult(intent, 0)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue