This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| adjustSize = (sourceWidth, sourceHeight, shareImage) => { | |
| const width = shareImage | |
| ? Metrics.screenWidth - Metrics.doubleBaseMargin * 2 | |
| : Metrics.screenWidth; | |
| const height = Metrics.screenHeight; | |
| let ratio = 1; | |
| if (width && height) { | |
| ratio = Math.min(width / sourceWidth, height / sourceHeight); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export function regionFrom(lat, lon, accuracy) { | |
| const oneDegreeOfLongitudeInMeters = 111.32 * 1000; | |
| const circumference = (40075 / 360) * 1000; | |
| const latDelta = accuracy * (1 / (Math.cos(lat) * circumference)); | |
| const lonDelta = (accuracy / oneDegreeOfLongitudeInMeters); | |
| return { | |
| latitude: lat, | |
| longitude: lon, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // @flow | |
| import React, { Component } from "react"; | |
| import { connect } from "react-redux"; | |
| import _ from "lodash"; | |
| // redux imports | |
| import { | |
| request as attachmentRequest, | |
| clear as clearAttachmentRequest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from "react"; | |
| import Geolocation from "react-native-geolocation-service"; | |
| import { connect } from "react-redux"; | |
| import { PermissionsAndroid } from "react-native"; | |
| import OpenSettings from "react-native-open-settings"; | |
| import Utils from "../../utils"; | |
| // redux imports | |
| import { CURRENT_LOCATION } from "../../actions/ActionTypes"; | |
| import { generalSaveAction } from "../../actions/GeneralAction"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const INPUT_TYPES = { | |
| TEXT: "TEXT", | |
| EMAIL: "EMAIL", | |
| PASSWORD: "PASSWORD", | |
| NUMBER: "NUMBER", | |
| PHONE: "PHONE" | |
| }; | |
| export { INPUT_TYPES }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // @flow | |
| import _ from "lodash"; | |
| import React from "react"; | |
| import PropTypes from "prop-types"; | |
| import { FlatList as FlatListRN, View } from "react-native"; | |
| import { | |
| Separator, | |
| LoadingRequest, | |
| EmptyViewRequest, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * @flow | |
| * TODO: value * ratio difference between Android and iOS is of 2 value; | |
| * 16 in iOS is equals to 14 in android but this need to be verify. | |
| */ | |
| import { Dimensions, Platform, StyleSheet } from "react-native"; | |
| const { width, height } = Dimensions.get("window"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // @flow | |
| import * as storage from "redux-storage"; | |
| import { createLogger } from "redux-logger"; | |
| import createSagaMiddleware from "redux-saga"; | |
| import filter from "redux-storage-decorator-filter"; | |
| import { composeWithDevTools } from "remote-redux-devtools"; | |
| import { createStore, applyMiddleware } from "redux"; | |
| import createEngine from "redux-storage-engine-reactnativeasyncstorage"; | |
| // import reducers from "../reducers"; |
NewerOlder