Skip to content

Commit

Permalink
only pin new drag/drop history if some histories are already pinned
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedhamidawan committed Feb 23, 2024
1 parent 4659f34 commit 970e7b2
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions client/src/components/History/Multiple/MultipleViewList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,13 @@ async function onDrop(evt: any) {
if (multiple && collectionCount > 0) {
Toast.info(`${collectionCount} collection${collectionCount > 1 ? "s" : ""} copied to new history`);
}
// pin the newly created history via the drop
historyStore.pinHistory(currentHistoryId);
// also pin the original history where the item came from
historyStore.pinHistory(originalHistoryId);
if (historyStore.pinnedHistories.length > 0) {
// pin the newly created history via the drop
historyStore.pinHistory(currentHistoryId);
// also pin the original history where the item came from
historyStore.pinHistory(originalHistoryId);
}
}
processingDrop.value = false;
}
Expand Down

0 comments on commit 970e7b2

Please sign in to comment.