Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit 23af97d

Browse files
committed
Remove isMobile in favor of Platform.OS
1 parent 17c109b commit 23af97d

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

src/action/index-mobile.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ import AtplAction from './autopilot';
4343
//
4444

4545
store.init(); // initialize computed values
46-
store.isMobile = true;
4746

4847
export const db = new AppStorage(store, AsyncStorage);
4948
export const grpc = new GrpcAction(store, NativeModules, NativeEventEmitter);

src/store.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import { DEFAULT_ROUTE, DEFAULT_UNIT, DEFAULT_FIAT } from './config';
1919
export class Store {
2020
constructor() {
2121
extendObservable(this, {
22-
isMobile: false, // Mobile app or desktop electron
2322
navReady: false, // the navigator on mobile is ready
2423
loaded: false, // Is persistent data loaded
2524
unlockerReady: false, // Is wallet unlocker running

src/view/cli.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { Component } from 'react';
2-
import { ScrollView, StyleSheet, Share } from 'react-native';
2+
import { ScrollView, StyleSheet, Share, Platform } from 'react-native';
33
import { observer } from 'mobx-react';
44
import PropTypes from 'prop-types';
55
import { SplitBackground } from '../component/background';
@@ -9,6 +9,7 @@ import { BackButton, ShareButton, Button } from '../component/button';
99
import { createStyles, maxWidth } from '../component/media-query';
1010
import { color, font, breakWidth } from '../component/style';
1111
import { getLogs, error } from '../action/log';
12+
import { Platform } from 'app-builder-lib';
1213

1314
//
1415
// CLI View
@@ -28,10 +29,10 @@ class CLIView extends Component {
2829
<Header separator style={styles.header}>
2930
<BackButton onPress={() => nav.goSettings()} />
3031
<Title title="Logs" />
31-
{store.isMobile ? (
32-
<ShareButton onPress={() => this.shareLogs()} />
33-
) : (
32+
{Platform.OS === 'web' ? (
3433
<Button onPress={() => {}} />
34+
) : (
35+
<ShareButton onPress={() => this.shareLogs()} />
3536
)}
3637
</Header>
3738
<LogOutput logs={store.logs} />

0 commit comments

Comments
 (0)