diff --git a/desk/app/diary.hoon b/desk/app/diary.hoon index 206767d9cb..b2c645adc9 100644 --- a/desk/app/diary.hoon +++ b/desk/app/diary.hoon @@ -1087,7 +1087,12 @@ =. notes.diary (reduce:di-notes time p.dif) =. cor (give-brief flag di-brief) =/ cons=(list (list content:ha)) - (hark:di-notes [flag bowl p.dif]) + :: when using time, we need to use the new time if we're adding, + :: otherwise the time on the diff is correct + =- (hark:di-notes [flag bowl - q.p.dif]) + ?+ -.q.p.dif p.p.dif + %add time + == =/ rope ?: =(%quips -.q.p.dif) /note/(rsh 4 (scot %ui p.p.dif)) diff --git a/desk/lib/notes.hoon b/desk/lib/notes.hoon index 45970e9b33..2b4c08f462 100644 --- a/desk/lib/notes.hoon +++ b/desk/lib/notes.hoon @@ -109,57 +109,49 @@ |= [=flag:d =bowl:gall =time =delta:notes:d] ^- (list (list content:ha)) ?. ?=(%quips -.delta) - ?. ?=(%add -.delta) + ?. ?=(%add -.delta) ~ + ?. (want-hark [flag %msg bowl]) ~ + =/ =essay:d p.+.delta + =/ from-me =(author.essay our.bowl) + ?: from-me ~ + =/ content + %+ turn + content.essay + |= =verse:d + ?. ?=(%block -.verse) + p.+.verse ~ - ?: (want-hark [flag %msg bowl]) - =/ =essay:d p.+.delta - =/ from-me =(author.essay our.bowl) - ?: from-me ~ - =/ content - %+ turn - content.essay - |= =verse:d - ?. ?=(%block -.verse) - p.+.verse - ~ - =- ~[-] - :~ [%ship author.essay] - ' published a note: ' - [%emph title.essay] - ' ' - (flatten (zing content)) - == - ~ - =/ [@ =note:d] (got time) - ~! q.p.delta - ?. ?=(%add -.q.p.delta) - ~ + =- ~[-] + :~ [%ship author.essay] + ' published a note: ' + [%emph title.essay] + ' ' + (flatten (zing content)) + == + ?. ?=(%add -.q.p.delta) ~ + :: let's be extra safe here + =/ entry=(unit [@ =note:d]) (get time) + ?~ entry ~ + =* note note.u.entry =/ =memo:d p.q.p.delta =/ in-replies %+ lien (tap:on:quips:d quips.note) |= [=^time =quip:d] =(author.quip our.bowl) - ?: (want-hark [flag %msg bowl]) - =- ~[-] - :~ [%ship author.memo] - ' commented on ' - [%emph title.note] - ': ' - [%ship author.memo] - ': ' - (flatten q.content.memo) - == + =/ contents + :~ :~ [%ship author.memo] + ' commented on ' + [%emph title.note] + ': ' + [%ship author.memo] + ': ' + (flatten q.content.memo) + == == + ?: (want-hark [flag %msg bowl]) contents ?: |(=(author.memo our.bowl) &(!in-replies !=(author.note our.bowl))) ~ ?. (want-hark [flag %to-us bowl]) ~ - =- ~[-] - :~ [%ship author.memo] - ' commented on ' - [%emph title.note] - ': ' - [%ship author.memo] - ': ' - (flatten q.content.memo) - == + contents +:: :: +trace: turn note into outline :: :: XX: should trim actual note contents, probably diff --git a/ui/src/notifications/Notification.tsx b/ui/src/notifications/Notification.tsx index ded967af3e..df60c871ff 100644 --- a/ui/src/notifications/Notification.tsx +++ b/ui/src/notifications/Notification.tsx @@ -342,9 +342,7 @@ export default function Notification({ )}
- {bin.unread ? ( - - ) : null} + {bin.unread ? : null} {makePrettyTime(new Date(bin.time))}