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

@@ -3,7 +3,7 @@ import Modal from "react-native-modal"
import PropTypes from "prop-types"
import { View, Text, TouchableOpacity } from "react-native"
import { Icon, OptionStrip } from "../ui"
import autobind from "autobind-decorator"
import { reactAutoBind } from "auto-bind2"
import { api } from "../API"
export class ApiModal extends Component {
@@ -14,12 +14,12 @@ export class ApiModal extends Component {
constructor(props) {
super(props)
reactAutoBind(this)
this.state = {
value: api.backend,
}
}
@autobind
handleButtonPress() {
const { onDismiss } = this.props
@@ -28,7 +28,6 @@ export class ApiModal extends Component {
}
}
@autobind
handleValueChanged(newValue) {
this.setState({ value: newValue })
}

View File

@@ -3,7 +3,7 @@ import Modal from "react-native-modal"
import PropTypes from "prop-types"
import { View, Image, TouchableOpacity } from "react-native"
import { Icon } from "../ui"
import autobind from "autobind-decorator"
import { reactAutoBind } from "auto-bind2"
export class ImageViewerModal extends Component {
static propTypes = {
@@ -12,7 +12,11 @@ export class ImageViewerModal extends Component {
onDismiss: PropTypes.func,
}
@autobind
constructor(props) {
super(props)
reactAutoBind(this)
}
handleButtonPress() {
const { onDismiss } = this.props

View File

@@ -3,7 +3,7 @@ import Modal from "react-native-modal"
import PropTypes from "prop-types"
import { View, Text, TouchableOpacity } from "react-native"
import { Icon } from "../ui"
import autobind from "autobind-decorator"
import { reactAutoBind } from "auto-bind2"
export class MessageModal extends Component {
static propTypes = {
@@ -14,7 +14,11 @@ export class MessageModal extends Component {
onDismiss: PropTypes.func,
}
@autobind
constructor(props) {
super(props)
reactAutoBind(this)
}
handleButtonPress() {
if (this.props.onDismiss) {
this.props.onDismiss()

View File

@@ -3,7 +3,6 @@ import Modal from "react-native-modal"
import PropTypes from "prop-types"
import { View, Text, ActivityIndicator, TouchableOpacity } from "react-native"
import { ProgressBar } from "../ui"
import autobind from "autobind-decorator"
export class ProgressModal extends Component {
static propTypes = {