-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React Native 0.46 #7759
React Native 0.46 #7759
Changes from all commits
688fd82
83425c8
6198bcb
58d25a2
ce21401
3b73cee
d611f7e
6c2e63e
3ef0f53
2401d42
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
machine: | ||
xcode: | ||
version: 7.2 | ||
version: 8.3.3 | ||
node: | ||
version: 5.7.0 | ||
version: 6 | ||
java: | ||
version: oraclejdk8 | ||
environment: | ||
|
@@ -18,6 +18,7 @@ general: | |
build_dir: shared | ||
dependencies: | ||
pre: | ||
- nvm ls-remote | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just so we can see available versions |
||
- sudo apt-key adv --fetch-keys http://dl.yarnpkg.com/debian/pubkey.gpg | ||
- echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list | ||
- sudo apt-get update -qq | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
.*/node_modules/fbjs/.* | ||
.*/node_modules/is-my-json-valid/.* | ||
.*/node_modules/json5/.* | ||
.*/node_modules/metro-bundler/.* | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the rn packager got moved here and has a lot of errors |
||
.*/node_modules/npm/.* | ||
.*/node_modules/react-native/.* | ||
.*/node_modules/react-navigation/.* | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -184,15 +184,18 @@ function* handleKbfsFavoritesOOBM(kbfsFavoriteMessages: Array<OutOfBandMessage>) | |
const createdTLFs = msgsWithParsedBodies.filter(m => m.body.action === 'create') | ||
|
||
const username: string = (yield select(usernameSelector): any) | ||
yield createdTLFs | ||
.map(m => { | ||
const folder = m.body.tlf ? markTLFCreated(folderFromPath(username, m.body.tlf)) : null | ||
if (folder != null) { | ||
return put(folder) | ||
} | ||
console.warn('Failed to parse tlf for oobm:', m) | ||
}) | ||
.filter(i => !!i) | ||
// Must do this else we get weird errors from redux-saga, see https://github.com/redux-saga/redux-saga/issues/1000#issuecomment-315180255 | ||
yield Promise.resolve( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. have to wrap this in Promise else redux-saga thinks we're returning other generators and gives us yellow boxes |
||
createdTLFs | ||
.map(m => { | ||
const folder = m.body.tlf ? markTLFCreated(folderFromPath(username, m.body.tlf)) : null | ||
if (folder != null) { | ||
return put(folder) | ||
} | ||
console.warn('Failed to parse tlf for oobm:', m) | ||
}) | ||
.filter(i => !!i) | ||
) | ||
} | ||
|
||
function* handlePushOOBM(pushOOBM: pushOOBM) { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ import {configurePush} from '../push/creators' | |
import {pathSelector, navigateTo, navigateAppend} from '../route-tree' | ||
import {overrideLoggedInTab} from '../../local-debug' | ||
import {toDeviceType} from '../../constants/types/more' | ||
import {call, put, take, race, select} from 'redux-saga/effects' | ||
import {call, put, take, race, select, all} from 'redux-saga/effects' | ||
import * as Saga from '../../util/saga' | ||
|
||
import type {DeviceRole} from '../../constants/login' | ||
|
@@ -137,7 +137,7 @@ function* navBasedOnLoginState() { | |
} | ||
} else if (registered) { | ||
// relogging in | ||
yield [put.resolve(getExtendedStatus()), put.resolve(getAccounts())] | ||
yield all([put.resolve(getExtendedStatus()), put.resolve(getAccounts())]) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. redux-saga wants arrays to be wrapped in all() There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's another spot that causes this warning. I have a fix in a perf commit |
||
yield put(navigateTo(['login'], [loginTab])) | ||
} else if (loginError) { | ||
// show error on login screen | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ import engine from '../engine' | |
import openUrl from '../util/open-url' | ||
import {requestIdleCallback} from '../util/idle-callback' | ||
import {showAllTrackers} from '../local-debug' | ||
import {isMobile} from '../constants/platform' | ||
|
||
import type {Action, Dispatch, AsyncAction} from '../constants/types/flux' | ||
import type {CancelHandlerType} from '../engine/session' | ||
|
@@ -184,6 +185,10 @@ function registerIdentifyUi(): TrackerActionCreator { | |
let trackerTimeoutError = 0 | ||
|
||
const onStart = username => { | ||
// Don't do this on mobile | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Android complains about long timeouts (over 1m) and likely this doesn't make sense in the mobile context anyways. its not a tracker card that hangs out on the side, it'd be your whole screen. no one is waiting 5 minutes... |
||
if (isMobile) { | ||
return | ||
} | ||
trackerTimeoutError = setTimeout(() => { | ||
dispatch({ | ||
type: Constants.identifyFinished, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// @flow | ||
import {connector, Main} from './main-shared.native' | ||
import {compose, lifecycle, withProps} from 'recompose' | ||
import {NativeBackAndroid} from '../common-adapters/index.native' | ||
import {NativeBackHandler} from '../common-adapters/index.native' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This got renamed |
||
import {getPath} from '../route-tree' | ||
|
||
module.hot && | ||
|
@@ -17,7 +17,7 @@ export default compose( | |
connector, | ||
lifecycle({ | ||
componentWillMount: function() { | ||
NativeBackAndroid.addEventListener('hardwareBackPress', () => { | ||
NativeBackHandler.addEventListener('hardwareBackPress', () => { | ||
if (getPath(this.props.routeState).size === 1) { | ||
return false | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new rn tooling requires some things not in 5