diff options
author | Bob Zeleznik <zzzman@gmail.com> | 2020-02-05 08:35:58 -0500 |
---|---|---|
committer | Bob Zeleznik <zzzman@gmail.com> | 2020-02-05 08:35:58 -0500 |
commit | 6c7d337d64bca66456c617986e03f44bc5d807d8 (patch) | |
tree | 62939950bd968e7385d6e491c4e100ae17e2ce79 /src/server/authentication/models/current_user_utils.ts | |
parent | da92903fb49b2c7d34bb44f11bf72a6cd49b8c0d (diff) |
added pin to pres button.
Diffstat (limited to 'src/server/authentication/models/current_user_utils.ts')
-rw-r--r-- | src/server/authentication/models/current_user_utils.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/server/authentication/models/current_user_utils.ts b/src/server/authentication/models/current_user_utils.ts index f2c3aab35..a6dd809f4 100644 --- a/src/server/authentication/models/current_user_utils.ts +++ b/src/server/authentication/models/current_user_utils.ts @@ -304,6 +304,15 @@ export class CurrentUserUtils { return doc; } + public static IsDocPinned(doc: Doc) { + //add this new doc to props.Document + const curPres = Cast(CurrentUserUtils.UserDocument.curPresentation, Doc) as Doc; + if (curPres) { + return DocListCast(curPres.data).findIndex((val) => Doc.AreProtosEqual(val, doc)) !== -1; + } + return false; + } + public static async loadCurrentUser() { return rp.get(Utils.prepend("/getCurrentUser")).then(response => { if (response) { |