From 71aaf0cb07aab3896f6660c81cc7bf888cc07662 Mon Sep 17 00:00:00 2001 From: Lionel Han <47760119+IGoByJoe@users.noreply.github.com> Date: Thu, 4 Jun 2020 16:30:14 -0700 Subject: minor changes --- src/mobile/MobileInterface.tsx | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) (limited to 'src') diff --git a/src/mobile/MobileInterface.tsx b/src/mobile/MobileInterface.tsx index 78bc021c9..94394e277 100644 --- a/src/mobile/MobileInterface.tsx +++ b/src/mobile/MobileInterface.tsx @@ -202,7 +202,7 @@ export default class MobileInterface extends React.Component { pinToPres={emptyFunction} rootSelected={returnFalse} removeDocument={undefined} - onClick={undefined} + onClick={ScriptField.MakeScript('this.uploadAudio()')} ScreenToLocalTransform={Transform.Identity} ContentScaling={returnOne} NativeHeight={returnZero} @@ -360,18 +360,13 @@ export default class MobileInterface extends React.Component {
-
- {buttons} -
-
this.uploadAudio()}>Upload Audio +
this.uploadAudio()}> + Upload Audio
Home
- ); } @@ -459,7 +454,7 @@ export default class MobileInterface extends React.Component { } } - recordAudio = async () => { + recordAudio = () => { // upload to server with known URL if (this._activeDoc.title !== "mobile audio") { this._parents.push(this._activeDoc); @@ -472,15 +467,6 @@ export default class MobileInterface extends React.Component { this.switchCurrentView((userDoc: Doc) => audioDoc); this.toggleSidebar(); } - const audioRightSidebar = Cast(Doc.UserDoc().rightSidebarCollection, Doc) as Doc; - this.audioState = await audioDoc.getProto; - if (this.audioState) { - console.log(this.audioState); - const data = Cast(audioRightSidebar.data, listSpec(Doc)); - if (data) { - data.push(audioDoc); - } - } } uploadAudio = () => { -- cgit v1.2.3-70-g09d2