Added notification read info from SWAD

This commit is contained in:
Juan Miguel Boyero Corral 2013-11-25 22:56:52 +01:00
parent cbfb5f2d6c
commit 12b36e6485
2 changed files with 4 additions and 3 deletions

View File

@ -392,8 +392,9 @@ public class Notifications extends Module {
String summary = pii.getProperty("summary").toString(); String summary = pii.getProperty("summary").toString();
Integer status = Integer.valueOf(pii.getProperty("status").toString()); Integer status = Integer.valueOf(pii.getProperty("status").toString());
String content = pii.getProperty("content").toString(); String content = pii.getProperty("content").toString();
boolean notifReadSWAD = (status >= 4);
SWADNotification n = new SWADNotification(notifCode, eventCode, eventType, eventTime, userSurname1, userSurname2, userFirstName, userPhoto, location, summary, status, content, false, false); SWADNotification n = new SWADNotification(notifCode, eventCode, eventType, eventTime, userSurname1, userSurname2, userFirstName, userPhoto, location, summary, status, content, notifReadSWAD, notifReadSWAD);
dbHelper.insertNotification(n); dbHelper.insertNotification(n);
if(isDebuggable) if(isDebuggable)

View File

@ -380,9 +380,9 @@ public class NotificationsSyncAdapterService extends Service {
String summary = pii.getProperty("summary").toString(); String summary = pii.getProperty("summary").toString();
Integer status = Integer.valueOf(pii.getProperty("status").toString()); Integer status = Integer.valueOf(pii.getProperty("status").toString());
String content = pii.getProperty("content").toString(); String content = pii.getProperty("content").toString();
boolean notifReadSWAD = (status >= 4);
//TODO Add "notification seen" info from SWAD SWADNotification n = new SWADNotification(notifCode, eventCode, eventType, eventTime, userSurname1, userSurname2, userFirstName, userPhoto, location, summary, status, content, notifReadSWAD, notifReadSWAD);
SWADNotification n = new SWADNotification(notifCode, eventCode, eventType, eventTime, userSurname1, userSurname2, userFirstName, userPhoto, location, summary, status, content, false, false);
dbHelper.insertNotification(n); dbHelper.insertNotification(n);
//Log.d(TAG, n.toString()); //Log.d(TAG, n.toString());