diff --git a/epydial/epydial.py b/epydial/epydial.py
index 7c2210f..b9f7714 100755
--- a/epydial/epydial.py
+++ b/epydial/epydial.py
@@ -174,8 +174,8 @@ class PyneoController(object):
class_.hon_hotornot.HotOrNot(vote, dbus_interface=DIN_HOTORNOT)
@classmethod
- def show_sms_detail(class_, number):
- class_.notify_callbacks("show_sms_detail", number)
+ def show_sms_detail(class_, number, status):
+ class_.notify_callbacks("show_sms_detail", number, status)
@classmethod
def power_up_gsm(class_):
diff --git a/epydial/sms_detail.py b/epydial/sms_detail.py
index 6a89384..ccda574 100644
--- a/epydial/sms_detail.py
+++ b/epydial/sms_detail.py
@@ -21,10 +21,10 @@ class SmsDetail(EdjeGroup):
cursor.execute("UPDATE sms SET status='REC READ' WHERE time='%s'" %(sms_time))
connection.commit()
- def on_show_sms_detail(self, sms_number):
+ def on_show_sms_detail(self, sms_number, sms_status):
connection = connect(DB_FILE_PATH)
cursor = connection.cursor()
- cursor.execute("SELECT * FROM sms WHERE status='%s' ORDER BY time DESC LIMIT 1 OFFSET %s" %('REC UNREAD', sms_number))
+ cursor.execute("SELECT * FROM sms WHERE status='%s' ORDER BY time DESC LIMIT 1 OFFSET %s" %(sms_status, sms_number))
for row in cursor:
self.part_text_set("sms_text_1", row[2] + '
' + row[1] + '
' + row[3])
diff --git a/epydial/sms_screen.py b/epydial/sms_screen.py
index ae5ecaf..72bd5e6 100644
--- a/epydial/sms_screen.py
+++ b/epydial/sms_screen.py
@@ -59,19 +59,19 @@ class SmsScreen(EdjeGroup):
if self.detail == False:
if source == "1":
PyneoController.show_sms_screen_detail()
- PyneoController.show_sms_detail(self.sms_offset)
+ PyneoController.show_sms_detail(self.sms_offset, self.sorted_by)
if source == "2":
self.sms_offset += 1
PyneoController.show_sms_screen_detail()
- PyneoController.show_sms_detail(self.sms_offset)
+ PyneoController.show_sms_detail(self.sms_offset, self.sorted_by)
if source == "3":
self.sms_offset += 2
PyneoController.show_sms_screen_detail()
- PyneoController.show_sms_detail(self.sms_offset)
+ PyneoController.show_sms_detail(self.sms_offset, self.sorted_by)
if source == "4":
self.sms_offset += 3
PyneoController.show_sms_screen_detail()
- PyneoController.show_sms_detail(self.sms_offset)
+ PyneoController.show_sms_detail(self.sms_offset, self.sorted_by)
if source == "button_10":
PyneoController.show_dialer_screen()
if source == "button_12":