aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionFreeForm
diff options
context:
space:
mode:
authorMelissa Zhang <mzhang19096@gmail.com>2020-08-06 14:04:31 -0700
committerMelissa Zhang <mzhang19096@gmail.com>2020-08-06 14:04:31 -0700
commitbe30bb49c7bd2370adb97724381f738b479f5469 (patch)
treec05b3014a10d1790534898c5e5233a3e6ee0ce61 /src/client/views/collections/collectionFreeForm
parent0416c6d82f7c63ddef636e587f612108e978d8eb (diff)
fixed bug where items deleted with backspace key or MarqueeView don't show up in recently closed
Diffstat (limited to 'src/client/views/collections/collectionFreeForm')
-rw-r--r--src/client/views/collections/collectionFreeForm/MarqueeView.tsx12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/client/views/collections/collectionFreeForm/MarqueeView.tsx b/src/client/views/collections/collectionFreeForm/MarqueeView.tsx
index a32c8b363..5f882c990 100644
--- a/src/client/views/collections/collectionFreeForm/MarqueeView.tsx
+++ b/src/client/views/collections/collectionFreeForm/MarqueeView.tsx
@@ -341,8 +341,18 @@ export class MarqueeView extends React.Component<SubCollectionViewProps & Marque
@action
delete = () => {
- this.props.removeDocument(this.marqueeSelect(false));
+ const recent = Cast(Doc.UserDoc().myRecentlyClosed, Doc) as Doc;
+ const selected = this.marqueeSelect(false);
SelectionManager.DeselectAll();
+
+ selected.map(doc => {
+ const effectiveAcl = GetEffectiveAcl(doc);
+ if (effectiveAcl === AclEdit || effectiveAcl === AclAdmin) { // deletes whatever you have the right to delete
+ recent && Doc.AddDocToList(recent, "data", doc, undefined, true, true);
+ this.props.removeDocument(doc);
+ }
+ });
+
this.cleanupInteractions(false);
MarqueeOptionsMenu.Instance.fadeOut(true);
this.hideMarquee();