Added option to delete SMS

andrejusk/bday
Alistair MacDonald 2018-08-31 18:18:52 +01:00 committed by GitHub
parent 164764bf2c
commit 8780933793
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -46,6 +46,11 @@ while True:
else:
message = sim800.readsms(selection["index"])
notice(message, title=selection["title"])
if prompt_boolean("Delete this message?", title=selection["title"]):
sim800.deletesms(selection["index"])
for menuitem in menuset:
if menuitem["index"]==selection["index"]:
menuset.remove(menuitem)
else:
break