aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/LightboxView.tsx
diff options
context:
space:
mode:
authormehekj <mehek.jethani@gmail.com>2023-03-14 19:32:06 -0400
committermehekj <mehek.jethani@gmail.com>2023-03-14 19:32:06 -0400
commit504c8046c13dfe77316e42943e48c017d67c2ad8 (patch)
tree9e4e8f3b79d9a72fece08a075dd666aac8872001 /src/client/views/LightboxView.tsx
parentc68e751531f972fcf201089f26e69627cfe4fe3c (diff)
parent8fe91ed2bbb8141657830e238043af37e94a91e4 (diff)
Merge branch 'master' into schema-mehek
Diffstat (limited to 'src/client/views/LightboxView.tsx')
-rw-r--r--src/client/views/LightboxView.tsx9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/client/views/LightboxView.tsx b/src/client/views/LightboxView.tsx
index 2567d44bb..976c8763e 100644
--- a/src/client/views/LightboxView.tsx
+++ b/src/client/views/LightboxView.tsx
@@ -4,9 +4,8 @@ import { observer } from 'mobx-react';
import * as React from 'react';
import { Doc, DocListCast, Opt } from '../../fields/Doc';
import { InkTool } from '../../fields/InkField';
-import { List } from '../../fields/List';
-import { Cast, DocCast, NumCast, StrCast } from '../../fields/Types';
-import { emptyFunction, returnEmptyDoclist, returnEmptyFilter, returnFalse, returnTrue } from '../../Utils';
+import { Cast, NumCast, StrCast } from '../../fields/Types';
+import { emptyFunction, returnEmptyDoclist, returnEmptyFilter, returnTrue } from '../../Utils';
import { DocUtils } from '../documents/Documents';
import { DocumentManager } from '../util/DocumentManager';
import { LinkManager } from '../util/LinkManager';
@@ -88,7 +87,7 @@ export class LightboxView extends React.Component<LightboxViewProps> {
...future
.slice()
.sort((a, b) => NumCast(b._timecodeToShow) - NumCast(a._timecodeToShow))
- .sort((a, b) => DocListCast(a.links).length - DocListCast(b.links).length),
+ .sort((a, b) => LinkManager.Links(a).length - LinkManager.Links(b).length),
];
}
this._doc = doc;
@@ -214,7 +213,7 @@ export class LightboxView extends React.Component<LightboxViewProps> {
if (coll) {
const fieldKey = Doc.LayoutFieldKey(coll);
const contents = [...DocListCast(coll[fieldKey]), ...DocListCast(coll[fieldKey + '-annotations'])];
- const links = DocListCast(coll.links)
+ const links = LinkManager.Links(coll)
.map(link => LinkManager.getOppositeAnchor(link, coll))
.filter(doc => doc)
.map(doc => doc!);