...
 
Commits (14)
......@@ -86,7 +86,6 @@ public class MainApplication extends Application implements ShareApplication, Re
new ShareMenuPackage(),
new RNMediaMetaPackage(),
new RNFSPackage(),
new JitsiMeetPackage(),
new SQLitePluginPackage(),
new BackgroundTimerPackage()
);
......
......@@ -9,7 +9,7 @@ import {
FlatList,
Keyboard,
Platform,
TextInput,
// TextInput,
TouchableOpacity,
TouchableHighlight,
ActivityIndicator,
......@@ -38,6 +38,9 @@ import i18n from '../common/services/i18n.service';
import blockListService from '../common/services/block-list.service';
import autobind from "../common/helpers/autobind";
// workaround for android copy/paste issue
import TextInput from '../common/components/TextInput';
// types
type Props = {
header?: any,
......
......@@ -73,6 +73,8 @@ export default class TagInput extends Component {
render() {
let tags = null;
const autoFocus = this.props.noAutofocus ? false : true;
const ViewCmp = this.props.noScroll ? View : ScrollView;
if (!this.props.hideTags) {
tags = <View style={styles.tagContainer}>
{this.props.tags.map((t,i) => <View style={styles.tag} key={i} >
......@@ -82,14 +84,14 @@ export default class TagInput extends Component {
</View>
}
return (
<ScrollView keyboardShouldPersistTaps={'always'}>
<ViewCmp keyboardShouldPersistTaps={'always'}>
{tags}
{this.state.error ? <Text style={styles.error}>{this.state.error}</Text> : null}
<TextInput
autoCapitalize="none"
autoFocus={autoFocus}
style={{height: 35, width: '100%', borderColor: '#ccc', borderBottomWidth: 1, padding: 10}}
ref={r => this.inputRef = r}
style={styles.input}
ref={this.setInputRef}
value={this.state.text}
blurOnSubmit={false}
onChangeText={this.onChangeText}
......@@ -99,14 +101,27 @@ export default class TagInput extends Component {
onSubmitEditing={this.addTag}
onEndEditing={this.addTag}
/>
</ScrollView>
</ViewCmp>
);
}
/**
* Set input ref
* @param {TextInputRef} r
*/
setInputRef = r => this.inputRef = r;
}
const styles = StyleSheet.create({
input: {
height: 35,
width: '100%',
borderColor: '#ccc',
borderBottomWidth: 1,
padding: 10
},
error: {
fontFamily: 'Roboto',
color: 'red',
......
......@@ -112,6 +112,7 @@ export default class TagOptinDrawer extends Component {
</ScrollView>
<View style={styles.inputContainer}>
<TagInput
noScroll
noAutofocus={true}
hideTags={true}
tags={this.props.hashtag.suggested.map(m => m.value)}
......
......@@ -73,7 +73,6 @@ class LogService {
Sentry.captureException(error);
}
let stack = null;
if (__DEV__) {
stack = parseErrorStack(error);
......
import { setViewed } from "../../newsfeed/NewsfeedService";
import { isNetworkFail } from "../helpers/abortableFetch";
export default class Viewed {
......@@ -28,7 +29,9 @@ export default class Viewed {
response = await setViewed(entity, meta);
} catch (e) {
this.viewed.delete(entity.guid);
throw new Error('There was an issue storing the view');
if (!isNetworkFail(e)) {
throw new Error('There was an issue storing the view');
}
}
}
}
......
......@@ -88,13 +88,6 @@ export default class NewsfeedFilters extends Component {
this.props.store.setNsfw(value);
}
constructor(props) {
super(props);
if (Platform.OS === 'android') {
UIManager.setLayoutAnimationEnabledExperimental && UIManager.setLayoutAnimationEnabledExperimental(true);
}
}
/**
* Component will react (mobx)
*/
......