Skip to content

Commit

Permalink
GH-349: Replaced snapshot timestamp with Deleted timestamp when a sna…
Browse files Browse the repository at this point in the history
…pshot is deleted.

Fixed bug where a snapshot of a sleeping character didn't show lastAwake info.
  • Loading branch information
anisus committed Jan 30, 2025
1 parent b32ddd3 commit df0963a
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class DialogCharSnapshotAttachmentSnapshot {

render(el) {
let lvl = getCharIdleLevel(this.snapshot);
let isAwake = this.snapshot.status != 'asleep';
let isAwake = this.snapshot.state != 'asleep';

let about = new PanelSection(
l10n.l('dialogCharSnapshotAttachment.about', "About"),
Expand Down Expand Up @@ -98,7 +98,10 @@ class DialogCharSnapshotAttachmentSnapshot {
),
]),
n.elem('div', { className: 'dialogcharsnapshotattachment--timestamp flex-1' }, [
n.component(new ModelTxt(this.snapshot, m => formatDateTime(new Date(m.timestamp)))),
n.component(this.snapshot.deleted
? new Txt(l10n.l('dialogCharSnapshotAttachment.deletedTime', "Deleted {time}", { time: formatDateTime(new Date(this.snapshot.deleted)) }))
: new ModelTxt(this.snapshot, m => formatDateTime(new Date(m.timestamp))),
),
]),
]),
// Wipe avatar button
Expand Down

0 comments on commit df0963a

Please sign in to comment.