Fix for crash on exiting app.
parent
2f5e86c734
commit
edcb6fccb0
13
sms/main.py
13
sms/main.py
|
@ -1,6 +1,6 @@
|
||||||
"""SMS app for reading and sending messages
|
"""SMS app for reading and sending messages
|
||||||
"""
|
"""
|
||||||
___name___ = "Phone"
|
___name___ = "SMS"
|
||||||
___license___ = "MIT"
|
___license___ = "MIT"
|
||||||
___dependencies___ = ["app", "dialogs", "sim800", "ugfx_helper"]
|
___dependencies___ = ["app", "dialogs", "sim800", "ugfx_helper"]
|
||||||
___categories___ = ["System"]
|
___categories___ = ["System"]
|
||||||
|
@ -40,11 +40,12 @@ menuset.insert(0, { "title" : "Send message...", "index" : -1 })
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
selection = prompt_option(menuset, text="Select message", select_text="Read", none_text="Exit")
|
selection = prompt_option(menuset, text="Select message", select_text="Read", none_text="Exit")
|
||||||
if (selection["index"]==-1):
|
if (selection):
|
||||||
send_message()
|
if (selection["index"]==-1):
|
||||||
elif (selection):
|
send_message()
|
||||||
message = sim800.readsms(selection["index"])
|
else:
|
||||||
notice(message, title=selection["title"])
|
message = sim800.readsms(selection["index"])
|
||||||
|
notice(message, title=selection["title"])
|
||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue