fix: display session & remote history entries

This commit is contained in:
Baptiste Grob
2021-04-12 11:58:12 +02:00
parent 21e40bec40
commit 622963d04e
2 changed files with 6 additions and 3 deletions

View File

@@ -31,6 +31,9 @@ class HistoryMenuCtrl extends PureViewCtrl<unknown, HistoryState> {
fetchingRemoteHistory: false, fetchingRemoteHistory: false,
autoOptimize: this.application.historyManager.autoOptimize, autoOptimize: this.application.historyManager.autoOptimize,
diskEnabled: this.application.historyManager.isDiskEnabled(), diskEnabled: this.application.historyManager.isDiskEnabled(),
sessionHistory: this.application.historyManager.sessionHistoryForItem(
this.item
),
}; };
} }
@@ -124,7 +127,7 @@ class HistoryMenuCtrl extends PureViewCtrl<unknown, HistoryState> {
/** @entries */ /** @entries */
get sessionHistoryEntries() { get sessionHistoryEntries() {
return this.state.sessionHistory?.entries; return this.state.sessionHistory;
} }
async toggleSessionHistoryDiskSaving() { async toggleSessionHistoryDiskSaving() {

View File

@@ -28,7 +28,7 @@
| Saving to disk is not recommended. Decreases performance and increases app | Saving to disk is not recommended. Decreases performance and increases app
| loading time and memory footprint. | loading time and memory footprint.
menu-row( menu-row(
ng-repeat='revision in ctrl.sessionHistoryEntries track by $index' ng-repeat='revision in ctrl.state.sessionHistory track by $index'
action='ctrl.openSessionRevision(revision);' action='ctrl.openSessionRevision(revision);'
label='revision.previewTitle()' label='revision.previewTitle()'
) )
@@ -49,7 +49,7 @@
.sk-sublabel .sk-sublabel
| Fetch history from server. | Fetch history from server.
menu-row( menu-row(
ng-repeat='revision in ctrl.remoteHistory track by $index' ng-repeat='revision in ctrl.state.remoteHistory track by $index'
action='ctrl.openRemoteRevision(revision);' action='ctrl.openRemoteRevision(revision);'
label='ctrl.previewRemoteHistoryTitle(revision);' label='ctrl.previewRemoteHistoryTitle(revision);'
) )