From b00cd81d21e18a68ade1806777e9249f4218c035 Mon Sep 17 00:00:00 2001 From: Dusko Angirevic Date: Wed, 14 Jun 2017 16:57:44 +0200 Subject: [PATCH] better dates for notifications --- qml/lib/Worker.js | 6 +++--- qml/pages/components/VisualContainer.qml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qml/lib/Worker.js b/qml/lib/Worker.js index 2698d56..3d34a7a 100644 --- a/qml/lib/Worker.js +++ b/qml/lib/Worker.js @@ -83,9 +83,7 @@ function parseNotification(data){ //console.log(JSON.stringify(data)) var item = { id: data.id, - type: data.type, - created_at: new Date(data.created_at), - section: new Date(data["created_at"]).toLocaleDateString() + type: data.type }; switch (item['type']){ case "mention": @@ -124,6 +122,8 @@ function parseNotification(data){ } item['id'] = data.id + item['created_at'] = new Date(data.created_at) + item['section'] = new Date(data["created_at"]).toLocaleDateString() //WorkerScript.sendMessage({ 'fireNotification': true, "data": item}) diff --git a/qml/pages/components/VisualContainer.qml b/qml/pages/components/VisualContainer.qml index 33afb25..ba7c1ad 100644 --- a/qml/pages/components/VisualContainer.qml +++ b/qml/pages/components/VisualContainer.qml @@ -57,7 +57,7 @@ BackgroundItem { width: Theme.iconSizeSmall height: width smooth: true - source: reblog_account_avatar + source: typeof reblog_account_avatar !== "undefined" ? reblog_account_avatar : '' visible: typeof status_reblog !== "undefined" && status_reblog } }