aboutsummaryrefslogtreecommitdiff
path: root/src/mobile/MobileInterface.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/mobile/MobileInterface.tsx')
-rw-r--r--src/mobile/MobileInterface.tsx19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/mobile/MobileInterface.tsx b/src/mobile/MobileInterface.tsx
index e1360553a..f19496d25 100644
--- a/src/mobile/MobileInterface.tsx
+++ b/src/mobile/MobileInterface.tsx
@@ -104,14 +104,13 @@ import { action, computed, observable, runInAction } from 'mobx';
import { observer } from 'mobx-react';
import * as React from 'react';
import { Docs, DocumentOptions, DocUtils } from '../client/documents/Documents';
-import { DocumentType } from '../client/documents/DocumentTypes';
+import { CollectionViewType, DocumentType } from '../client/documents/DocumentTypes';
import { CurrentUserUtils } from '../client/util/CurrentUserUtils';
import { ScriptingGlobals } from '../client/util/ScriptingGlobals';
import { SettingsManager, ColorScheme } from '../client/util/SettingsManager';
import { Transform } from '../client/util/Transform';
import { UndoManager } from '../client/util/UndoManager';
import { TabDocView } from '../client/views/collections/TabDocView';
-import { CollectionViewType } from '../client/views/collections/CollectionView';
import { GestureOverlay } from '../client/views/GestureOverlay';
import { AudioBox } from '../client/views/nodes/AudioBox';
import { DocumentView } from '../client/views/nodes/DocumentView';
@@ -249,7 +248,7 @@ export class MobileInterface extends React.Component {
@observable private _parents: Array<Doc> = []; // array of parent docs (for pathbar)
@computed private get mainContainer() {
- return Doc.UserDoc() ? FieldValue(Cast(Doc.UserDoc().activeMobile, Doc)) : CurrentUserUtils.GuestMobile;
+ return Doc.UserDoc() ? FieldValue(Cast(Doc.UserDoc().activeMobile, Doc)) : Doc.GuestMobile;
}
constructor(props: Readonly<{}>) {
@@ -262,7 +261,7 @@ export class MobileInterface extends React.Component {
componentDidMount = () => {
// if the home menu is in list view -> adjust the menu toggle appropriately
this._menuListView = this._homeDoc._viewType === 'stacking' ? true : false;
- CurrentUserUtils.ActiveTool = InkTool.None; // ink should intially be set to none
+ Doc.ActiveTool = InkTool.None; // ink should intially be set to none
Doc.UserDoc().activeMobile = this._homeDoc; // active mobile set to home
AudioBox.Enabled = true;
@@ -511,7 +510,7 @@ export class MobileInterface extends React.Component {
);
}
// stores dashboards documents as 'dashboards' variable
- let dashboards = CurrentUserUtils.MyDashboards;
+ let dashboards = Doc.MyDashboards;
if (this.dashboards) {
dashboards = this.dashboards;
}
@@ -580,14 +579,14 @@ export class MobileInterface extends React.Component {
*/
@action
createNewDashboard = (id?: string) => {
- const scens = CurrentUserUtils.MyDashboards;
+ const scens = Doc.MyDashboards;
const dashboardCount = DocListCast(scens.data).length + 1;
const freeformOptions: DocumentOptions = {
x: 0,
y: 400,
title: 'Collection ' + dashboardCount,
};
- const freeformDoc = CurrentUserUtils.GuestTarget || Docs.Create.FreeformDocument([], freeformOptions);
+ const freeformDoc = Doc.GuestTarget || Docs.Create.FreeformDocument([], freeformOptions);
const dashboardDoc = Docs.Create.StandardCollectionDockingDocument([{ doc: freeformDoc, initialWidth: 600 }], { title: `Dashboard ${dashboardCount}` }, id, 'row');
const toggleTheme = ScriptField.MakeScript(`self.colorScheme = self.colorScheme ? undefined: ${ColorScheme.Dark}}`);
@@ -607,10 +606,10 @@ export class MobileInterface extends React.Component {
button.style.color = this._ink ? 'black' : 'white';
if (!this._ink) {
- CurrentUserUtils.ActiveTool = InkTool.Pen;
+ Doc.ActiveTool = InkTool.Pen;
this._ink = true;
} else {
- CurrentUserUtils.ActiveTool = InkTool.None;
+ Doc.ActiveTool = InkTool.None;
this._ink = false;
}
};
@@ -762,7 +761,7 @@ export class MobileInterface extends React.Component {
// For setting up the presentation document for the home menu
@action
setupDefaultPresentation = () => {
- const presentation = CurrentUserUtils.ActivePresentation;
+ const presentation = Doc.ActivePresentation;
if (presentation) {
this.switchCurrentView(presentation);