mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Drop history placeholder as it doesn't really help
This commit is contained in:
@@ -68,26 +68,13 @@ export const useHistoryStore = defineStore("historyStore", () => {
|
||||
const getHistoryById = computed(() => {
|
||||
return (historyId: string) => {
|
||||
if (!storedHistories.value[historyId]) {
|
||||
// Create a placeholder to avoid multiple requests for the same history
|
||||
// and reuse the reference to avoid reactivity issues
|
||||
storedHistories.value[historyId] = createHistoryPlaceholder(historyId);
|
||||
|
||||
// TODO: Try to remove this as it can cause computed side effects
|
||||
loadHistoryById(historyId);
|
||||
}
|
||||
return storedHistories.value[historyId]!;
|
||||
return storedHistories.value[historyId] ?? null;
|
||||
};
|
||||
});
|
||||
|
||||
function createHistoryPlaceholder(historyId: string) {
|
||||
const history = {
|
||||
id: historyId,
|
||||
name: "Loading...",
|
||||
contents_active: { active: 0, deleted: 0, hidden: 0 },
|
||||
} as AnyHistory;
|
||||
return history;
|
||||
}
|
||||
|
||||
const getHistoryNameById = computed(() => {
|
||||
return (historyId: string) => {
|
||||
const history = getHistoryById.value(historyId);
|
||||
|
||||
Reference in New Issue
Block a user