Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

Commit

Permalink
Merge pull request #589 from textileio/andrew/wait-connect-fix
Browse files Browse the repository at this point in the history
Fixes where it says wait
  • Loading branch information
andrewxhill authored Oct 5, 2018
2 parents 613d078 + 0692ec4 commit 92945c9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion App/SB/views/ThreadInvite/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class ThreadInvite extends React.PureComponent {
<View style={styles.buttonSingle}>
<Button
style={styles.button}
title='Wait'
title={!success ? 'Wait' : 'Continue'}
accessibilityLabel='Continue'
onPress={this.cancel}
disabled={!success}
Expand Down
6 changes: 3 additions & 3 deletions App/Sagas/NodeLifecycle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function * manageNode () {
if (yield select(PreferencesSelectors.verboseUi)) {
yield call(displayNotification, 'App State Change: ' + action.payload.newState)
}
yield call(logNewEvent, 'App State Change', action.payload.newState)
yield call(logNewEvent, 'State Change', action.payload.newState)

// Create and start the node no matter what, even if it's already created and/or started it should be fine to call again
// Use fork so we don't block listening for the next app state change while the node is created and started
Expand Down Expand Up @@ -111,11 +111,11 @@ function * stopNodeAfterDelay (ms: number) {
}

export function * backgroundTask () {
yield call(logNewEvent, 'Trigger', 'Background Task')
yield call(logNewEvent, 'Background trigger', 'Check new content')
}

export function * locationUpdate () {
yield call(logNewEvent, 'Trigger', 'Location Update')
yield call(logNewEvent, 'Location trigger', 'Check new content')
}

function displayNotification (message: string, title?: string) {
Expand Down
4 changes: 3 additions & 1 deletion App/Sagas/NodeOnline.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { put, take } from 'redux-saga/effects'
import {call, put, take} from 'redux-saga/effects'
import { getType } from 'typesafe-actions'
import TextileNodeActions from '../Redux/TextileNodeRedux'
import StorageActions from '../Redux/StorageRedux'
import {logNewEvent} from './DeviceLogs'

export function * onNodeOnline () {
while (yield take(getType(TextileNodeActions.nodeOnline))) {
yield call(logNewEvent, 'IPFS online', 'success')
yield put(TextileNodeActions.refreshMessagesRequest())
yield put(StorageActions.refreshLocalImagesRequest())
}
Expand Down
3 changes: 3 additions & 0 deletions App/Sagas/TextileSagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import CameraRollActions, { cameraRollSelectors, QueriedPhotosMap } from '../Red
import { uploadFile } from './UploadFile'
import Upload from 'react-native-background-upload'
import { ThreadData } from '../Redux/PhotoViewingRedux'
import {logNewEvent} from './DeviceLogs'

export function * signUp (action: ActionType<typeof AuthActions.signUpRequest>) {
const {referralCode, username, email, password} = action.payload
Expand Down Expand Up @@ -193,7 +194,9 @@ export function * refreshMessages () {
try {
yield call(TextileNode.refreshMessages)
yield put(TextileNodeActions.refreshMessagesSuccess(Date.now()))
yield call(logNewEvent, 'Refresh messages', 'Checked offline messages')
} catch (error) {
yield call(logNewEvent, 'Refresh messages', error.message, true)
yield put(TextileNodeActions.refreshMessagesFailure(error))
}
}
Expand Down

0 comments on commit 92945c9

Please sign in to comment.