diff options
author | Bob Zeleznik <zzzman@gmail.com> | 2020-05-09 16:57:23 -0400 |
---|---|---|
committer | Bob Zeleznik <zzzman@gmail.com> | 2020-05-09 16:57:23 -0400 |
commit | 99028f27788740d377fec3504f9370412cd2947d (patch) | |
tree | cd2ae745daef6d109b9d0c36cc65237f75539049 /src | |
parent | 4914965affb984e04e847460ce1b5750807b316f (diff) |
fixed google docs prompt problem.
Diffstat (limited to 'src')
-rw-r--r-- | src/client/apis/GoogleAuthenticationManager.tsx | 1 | ||||
-rw-r--r-- | src/client/views/nodes/formattedText/FormattedTextBox.tsx | 16 |
2 files changed, 7 insertions, 10 deletions
diff --git a/src/client/apis/GoogleAuthenticationManager.tsx b/src/client/apis/GoogleAuthenticationManager.tsx index 018c980d8..22d6fb582 100644 --- a/src/client/apis/GoogleAuthenticationManager.tsx +++ b/src/client/apis/GoogleAuthenticationManager.tsx @@ -36,7 +36,6 @@ export default class GoogleAuthenticationManager extends React.Component<{}> { public fetchOrGenerateAccessToken = async (displayIfFound = false) => { let response: any = await Networking.FetchFromServer("/readGoogleAccessToken"); - // if this is an authentication url, activate the UI to register the new access token if (new RegExp(AuthenticationUrl).test(response)) { this.isOpen = true; diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx index 63552321b..f3c277e20 100644 --- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx +++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx @@ -790,15 +790,13 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<(FieldViewProp } checkState = (exportState: Opt<GoogleApiClientUtils.Docs.ImportResult>, dataDoc: Doc) => { - GoogleAuthenticationManager.Instance.fetchOrGenerateAccessToken().then(() => { - if (exportState && this._editorView) { - const equalContent = isEqual(this._editorView.state.doc, exportState.state.doc); - const equalTitles = dataDoc.title === exportState.title; - const unchanged = equalContent && equalTitles; - dataDoc.unchanged = unchanged; - DocumentButtonBar.Instance.setPullState(unchanged); - } - }); + if (exportState && this._editorView) { + const equalContent = isEqual(this._editorView.state.doc, exportState.state.doc); + const equalTitles = dataDoc.title === exportState.title; + const unchanged = equalContent && equalTitles; + dataDoc.unchanged = unchanged; + DocumentButtonBar.Instance.setPullState(unchanged); + } } clipboardTextSerializer = (slice: Slice): string => { |