diff options
| author | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-07-30 22:11:39 +0530 |
|---|---|---|
| committer | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-07-30 22:11:39 +0530 |
| commit | 626c7b04dcfff293a2a30ed059e661100143199b (patch) | |
| tree | 01eb9a0b1cb1929b7d8768c0e572536966b5a497 /src/client/views/collections/CollectionView.tsx | |
| parent | a4dce48cafc008ae5c41295411bd238519d6287c (diff) | |
some playground mode stuff + minor sharingmanager changes
Diffstat (limited to 'src/client/views/collections/CollectionView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionView.tsx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/views/collections/CollectionView.tsx b/src/client/views/collections/CollectionView.tsx index 25a832994..5262c8b46 100644 --- a/src/client/views/collections/CollectionView.tsx +++ b/src/client/views/collections/CollectionView.tsx @@ -157,7 +157,7 @@ export class CollectionView extends Touchable<FieldViewProps & CollectionViewCus // }); // } - if (effectiveAcl === AclAddonly) { + if (effectiveAcl === AclAddonly && !getPlaygroundMode()) { added.map(doc => Doc.AddDocToList(targetDataDoc, this.props.fieldKey, doc)); } else { @@ -179,8 +179,9 @@ export class CollectionView extends Touchable<FieldViewProps & CollectionViewCus doc.context = this.props.Document; }); added.map(add => Doc.AddDocToList(Cast(Doc.UserDoc().myCatalog, Doc, null), "data", add)); - targetDataDoc[this.props.fieldKey] = new List<Doc>([...docList, ...added]); - targetDataDoc[this.props.fieldKey + "-lastModified"] = new DateField(new Date(Date.now())); + // targetDataDoc[this.props.fieldKey] = new List<Doc>([...docList, ...added]); + (targetDataDoc[this.props.fieldKey] as List<Doc>).push(...added); + if (!getPlaygroundMode()) targetDataDoc[this.props.fieldKey + "-lastModified"] = new DateField(new Date(Date.now())); } } } |
