Permalink
Browse files

Workaround for pausing timer.

  • Loading branch information...
dblock committed Jul 27, 2018
1 parent b98c7a8 commit 2a5212f205d291d506de7effaabfdd8d221a762e
Showing with 4 additions and 4 deletions.
  1. +4 −4 app/screens/Record.js
@@ -30,7 +30,7 @@ export default class Record extends React.Component {
}

_start() {
this.setState({ isMeetingStarted: true, meetingStartedAt: new Date() })
this.setState({ isMeetingStarted: true, meetingStartedAt: moment() })
}

_stop() {
@@ -40,8 +40,8 @@ export default class Record extends React.Component {
environment,
input: {
title: 'Untitled Meeting',
started: this.state.meetingStartedAt,
finished: new Date()
started: this.state.meetingStartedAt.toDate(),
finished: moment().toDate()
}
}).then(response => {
this.props.navigation.navigate('Main')
@@ -73,7 +73,7 @@ export default class Record extends React.Component {
countdown={false}
interval={1000}
formatTimer={(time, ms) =>
moment.duration(ms, "milliseconds").format("h [hours], m [minutes], s [seconds]")
moment.duration(moment().diff(this.state.meetingStartedAt), "milliseconds").format("h [hours], m [minutes], s [seconds]")
}
>
</TimerMachine>

0 comments on commit 2a5212f

Please sign in to comment.