mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Keep current history details on list update
The incoming list of histories contains only summary information for all of them and the current history has additional details that we need. Since the current history gets updated regularly, there is no harm in skipping the update from the incoming list.
This commit is contained in:
@@ -32,7 +32,14 @@ const mutations = {
|
||||
Vue.delete(state.histories, doomed.id);
|
||||
},
|
||||
setHistories(state, newHistories = []) {
|
||||
const currentHistoryId = state.currentHistoryId;
|
||||
const currentHistory = state.histories[currentHistoryId];
|
||||
const newMap = newHistories.reduce((acc, h) => ({ ...acc, [h.id]: h }), {});
|
||||
if (currentHistory) {
|
||||
// The incoming history list contains less information than the current history
|
||||
// so we restore the existing current history since it gets updated regularly anyway
|
||||
newMap[currentHistoryId] = currentHistory;
|
||||
}
|
||||
Vue.set(state, "histories", newMap);
|
||||
},
|
||||
setHistoriesLoading(state, isLoading) {
|
||||
|
||||
Reference in New Issue
Block a user