Fix incorrect history swapping / see more in #14173

This commit is contained in:
Dannon Baker
2022-07-26 11:07:33 -04:00
parent 8b6030f67e
commit c0b80f3cf2
2 changed files with 3 additions and 5 deletions
@@ -88,7 +88,7 @@ export default {
deleteHistory: (history) => this.deleteHistory({ history }),
deleteCurrentHistory: () => this.deleteHistory({ history: this.currentHistory }),
// purge history then clearn currentHistoryId
// purge history then clear currentHistoryId
purgeHistory: (history) => this.deleteHistory({ history, purge: true }),
purgeCurrentHistory: () => this.deleteHistory({ history: this.currentHistory, purge: true }),
@@ -152,10 +152,8 @@ const actions = {
commit("setCurrentHistoryId", history.id);
},
async setCurrentHistory({ dispatch, getters }, id) {
if (id !== getters.currentHistoryId) {
const changedHistory = await setCurrentHistoryOnServer(id);
dispatch("selectHistory", changedHistory);
}
const changedHistory = await setCurrentHistoryOnServer(id);
dispatch("selectHistory", changedHistory);
},
setHistory({ commit }, history) {
commit("setHistory", history);