diff options
author | geireann <60007097+geireann@users.noreply.github.com> | 2020-08-24 20:06:22 +0800 |
---|---|---|
committer | geireann <60007097+geireann@users.noreply.github.com> | 2020-08-24 20:06:22 +0800 |
commit | 3769283f04a0029e38d45b2611138f600e4748ef (patch) | |
tree | 052095949c90f740ce2ee3663fb97f1ea56aaad7 /src/client/views/DocumentButtonBar.tsx | |
parent | 31fac41cb8a3bd19b02dddc116b11c962f3339d3 (diff) |
merge fixes + pinDoc bug fix
Diffstat (limited to 'src/client/views/DocumentButtonBar.tsx')
-rw-r--r-- | src/client/views/DocumentButtonBar.tsx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/client/views/DocumentButtonBar.tsx b/src/client/views/DocumentButtonBar.tsx index e5f419558..17ed211dd 100644 --- a/src/client/views/DocumentButtonBar.tsx +++ b/src/client/views/DocumentButtonBar.tsx @@ -25,6 +25,7 @@ import { DocumentLinksButton } from './nodes/DocumentLinksButton'; import { Tooltip } from '@material-ui/core'; import SharingManager from '../util/SharingManager'; import { CurrentUserUtils } from '../util/CurrentUserUtils'; +import { SelectionManager } from '../util/SelectionManager'; const higflyout = require("@hig/flyout"); export const { anchorPoints } = higflyout; export const Flyout = higflyout.default; @@ -198,6 +199,7 @@ export class DocumentButtonBar extends React.Component<{ views: () => (DocumentV get pinButton() { const targetDoc = this.view0?.props.Document; let isPinned = targetDoc && Doc.isDocPinned(targetDoc); + // More than 1 document selected then all must be in presentation for isPinned to be true (then it will unpin all) if (SelectionManager.SelectedDocuments().length > 1) { SelectionManager.SelectedDocuments().forEach((docView: DocumentView) => { if (Doc.isDocPinned(docView.props.Document)) isPinned = true; |