Termux API update
This commit is contained in:
parent
87ffd22d35
commit
3be5af77c6
6
sms.py
6
sms.py
|
@ -84,8 +84,10 @@ class SMS_Service (Thread):
|
|||
l [i ['threadid']] [1] = i ['received']
|
||||
l [i ['threadid']] [2] = i ['body']
|
||||
l [i ['threadid']] [3] += 1
|
||||
if len (l [i ['threadid']]) == 4 and 'sender' in i and i ['type'] == 'inbox':
|
||||
l [i ['threadid']].append (i ['sender'])
|
||||
else:
|
||||
if 'sender' in i:
|
||||
if 'sender' in i and i ['type'] == 'inbox':
|
||||
l [i ['threadid']] = [i ['number'], i ['received'], i ['body'], 1, i ['sender']]
|
||||
else:
|
||||
l [i ['threadid']] = [i ['number'], i ['received'], i ['body'], 1]
|
||||
|
@ -100,6 +102,6 @@ class SMS_Service (Thread):
|
|||
l.append ((i ['received'], True if i ['type'] == 'inbox' else False, i ['body']))
|
||||
if number is None:
|
||||
number = i ['number']
|
||||
if 'sender' in i:
|
||||
if name is None and i ['type'] == 'inbox' and 'sender' in i:
|
||||
name = i ['sender']
|
||||
return (number, name, sorted (l, key = lambda item: item [0]))
|
Loading…
Reference in New Issue