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.tsx22
1 files changed, 4 insertions, 18 deletions
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 {
<div className="back" onClick={this.back}>
&#8592;
</div>
- <div>
- {buttons}
- </div>
- <div
- className="item" key="audio"
- onClick={() => this.uploadAudio()}>Upload Audio
+ <div className="item" key="audio" onClick={() => this.uploadAudio()}>
+ Upload Audio
</div>
<div className="item" key="home" onClick={this.returnHome}>
Home
</div>
</div>
-
</div>);
}
@@ -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 = () => {