Remove autobind decorator. Fix bugs in AR view

This commit is contained in:
John Lyon-Smith
2018-05-28 16:12:20 -07:00
parent eb3649547a
commit f07c61c3b5
26 changed files with 1512 additions and 1481 deletions

View File

@@ -10,7 +10,7 @@ import {
} from "react-native"
import { Icon, Header } from "../ui"
import { MessageModal } from "../Modal"
import autobind from "autobind-decorator"
import { reactAutoBind } from "auto-bind2"
import { SwipeListView } from "react-native-swipe-list-view"
import { api } from "../API"
import {
@@ -36,6 +36,7 @@ const styles = StyleSheet.create({
export class WorkItemList extends React.Component {
constructor(props) {
super(props)
reactAutoBind(this)
this.state = {
messageModal: null,
}
@@ -74,12 +75,10 @@ export class WorkItemList extends React.Component {
})
}
@autobind
handleItemSelect(item, ref) {
this.props.history.push(`/workItem?id=${item._id}`)
}
@autobind
handleItemDelete(item, ref) {
api
.deleteWorkItem(item._id)
@@ -110,17 +109,14 @@ export class WorkItemList extends React.Component {
})
}
@autobind
handleMessageDismiss() {
this.setState({ messageModal: null })
}
@autobind
handleDonePress() {
this.props.history.push("/workItem")
}
@autobind
handleBackPress() {
const { history } = this.props