better dates for notifications
This commit is contained in:
parent
b59fe852c7
commit
b00cd81d21
2 changed files with 4 additions and 4 deletions
|
@ -83,9 +83,7 @@ function parseNotification(data){
|
||||||
//console.log(JSON.stringify(data))
|
//console.log(JSON.stringify(data))
|
||||||
var item = {
|
var item = {
|
||||||
id: data.id,
|
id: data.id,
|
||||||
type: data.type,
|
type: data.type
|
||||||
created_at: new Date(data.created_at),
|
|
||||||
section: new Date(data["created_at"]).toLocaleDateString()
|
|
||||||
};
|
};
|
||||||
switch (item['type']){
|
switch (item['type']){
|
||||||
case "mention":
|
case "mention":
|
||||||
|
@ -124,6 +122,8 @@ function parseNotification(data){
|
||||||
}
|
}
|
||||||
|
|
||||||
item['id'] = data.id
|
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})
|
//WorkerScript.sendMessage({ 'fireNotification': true, "data": item})
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ BackgroundItem {
|
||||||
width: Theme.iconSizeSmall
|
width: Theme.iconSizeSmall
|
||||||
height: width
|
height: width
|
||||||
smooth: true
|
smooth: true
|
||||||
source: reblog_account_avatar
|
source: typeof reblog_account_avatar !== "undefined" ? reblog_account_avatar : ''
|
||||||
visible: typeof status_reblog !== "undefined" && status_reblog
|
visible: typeof status_reblog !== "undefined" && status_reblog
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue