From a86a056888d2ea352edf5703d13b1f5dbc657d7c Mon Sep 17 00:00:00 2001 From: Andras Schmelczer Date: Mon, 7 Apr 2025 20:22:30 +0100 Subject: [PATCH] Fix history ordering --- frontend/obsidian-plugin/src/views/history/history-view.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/obsidian-plugin/src/views/history/history-view.ts b/frontend/obsidian-plugin/src/views/history/history-view.ts index f1aef04e..d766e754 100644 --- a/frontend/obsidian-plugin/src/views/history/history-view.ts +++ b/frontend/obsidian-plugin/src/views/history/history-view.ts @@ -107,7 +107,8 @@ export class HistoryView extends ItemView { return; } - const entries = this.client.getHistoryEntries(); + // entries are newest first, but we prepend new ones + const entries = this.client.getHistoryEntries().toReversed(); if (this.historyEntryToElement.size === 0 && entries.length > 0) { // Clear the "No update has happened yet" message