1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-29 22:48:10 +02:00

Revert "Tools: Added eslint rule arrow-parens"

This reverts commit 0b6f5581f0.

It causes too many conflicts with pull requests.
This commit is contained in:
Laurent Cozic
2020-05-21 09:14:33 +01:00
parent b83eee751f
commit a96734f5be
166 changed files with 444 additions and 445 deletions

View File

@@ -170,7 +170,7 @@ class CameraView extends Component {
<View style={{ position: 'absolute', backgroundColor: '#000000', width: '100%', height: '100%' }}/>
<RNCamera
style={Object.assign({ position: 'absolute' }, cameraRect)}
ref={(ref) => {
ref={ref => {
this.camera = ref;
}}
type={this.props.cameraType}
@@ -223,7 +223,7 @@ class CameraView extends Component {
}
}
const mapStateToProps = (state) => {
const mapStateToProps = state => {
return {
cameraRatio: state.settings['camera.ratio'],
cameraType: state.settings['camera.type'],

View File

@@ -90,7 +90,7 @@ class Dropdown extends React.Component {
this.setState({ listVisible: false });
};
const itemRenderer = (item) => {
const itemRenderer = item => {
return (
<TouchableOpacity
style={itemWrapperStyle}
@@ -111,7 +111,7 @@ class Dropdown extends React.Component {
<View style={{ flex: 1, flexDirection: 'column' }}>
<TouchableOpacity
style={headerWrapperStyle}
ref={(ref) => (this.headerRef_ = ref)}
ref={ref => (this.headerRef_ = ref)}
disabled={this.props.disabled}
onPress={() => {
this.updateHeaderCoordinates();
@@ -141,7 +141,7 @@ class Dropdown extends React.Component {
style={itemListStyle}
items={this.props.items}
itemHeight={itemHeight}
itemRenderer={(item) => {
itemRenderer={item => {
return itemRenderer(item);
}}
/>

View File

@@ -93,11 +93,11 @@ class ItemList extends React.Component {
return (
<ScrollView
scrollEventThrottle={500}
onLayout={(event) => {
onLayout={event => {
this.onLayout(event);
}}
style={style}
onScroll={(event) => {
onScroll={event => {
this.onScroll(event);
}}
>

View File

@@ -123,7 +123,7 @@ class ActionButtonComponent extends React.Component {
}
}
const ActionButton = connect((state) => {
const ActionButton = connect(state => {
return {
folders: state.folders,
locale: state.settings.locale,

View File

@@ -78,7 +78,7 @@ class AppNavComponent extends Component {
}
}
const AppNav = connect((state) => {
const AppNav = connect(state => {
return {
route: state.route,
theme: state.settings.theme,

View File

@@ -240,7 +240,7 @@ class NoteBodyViewer extends Component {
allowFileAccess={true}
onLoadEnd={() => this.onLoadEnd()}
onError={() => reg.logger().error('WebView error')}
onMessage={(event) => {
onMessage={event => {
// Since RN 58 (or 59) messages are now escaped twice???
let msg = unescape(unescape(event.nativeEvent.data));

View File

@@ -133,7 +133,7 @@ class NoteItemComponent extends Component {
<View style={selectionWrapperStyle}>
<View style={opacityStyle}>
<View style={listItemStyle}>
<Checkbox style={checkboxStyle} checked={checkboxChecked} onChange={(checked) => this.todoCheckbox_change(checked)} />
<Checkbox style={checkboxStyle} checked={checkboxChecked} onChange={checked => this.todoCheckbox_change(checked)} />
<Text style={listItemTextStyle}>{Note.displayTitle(note)}</Text>
</View>
</View>
@@ -143,7 +143,7 @@ class NoteItemComponent extends Component {
}
}
const NoteItem = connect((state) => {
const NoteItem = connect(state => {
return {
theme: state.settings.theme,
noteSelectionEnabled: state.noteSelectionEnabled,

View File

@@ -87,10 +87,10 @@ class NoteListComponent extends Component {
if (this.props.items.length) {
return <FlatList
ref={(ref) => (this.rootRef_ = ref)}
ref={ref => (this.rootRef_ = ref)}
data={this.props.items}
renderItem={({ item }) => <NoteItem note={item} />}
keyExtractor={(item) => item.id}
keyExtractor={item => item.id}
/>;
} else {
if (!this.props.folders.length) {
@@ -109,7 +109,7 @@ class NoteListComponent extends Component {
}
}
const NoteList = connect((state) => {
const NoteList = connect(state => {
return {
items: state.notes,
folders: state.folders,

View File

@@ -356,8 +356,8 @@ class ScreenHeaderComponent extends React.PureComponent {
return pickerItems;
};
const titlePickerItems = (mustSelect) => {
const folders = this.props.folders.filter((f) => f.id !== Folder.conflictFolderId());
const titlePickerItems = mustSelect => {
const folders = this.props.folders.filter(f => f.id !== Folder.conflictFolderId());
let output = [];
if (mustSelect) output.push({ label: _('Move to notebook...'), value: null });
const folderTree = Folder.buildTree(folders);
@@ -448,7 +448,7 @@ class ScreenHeaderComponent extends React.PureComponent {
const menuComp =
!menuOptionComponents.length || !showContextMenuButton ? null : (
<Menu onSelect={(value) => this.menu_select(value)} style={this.styles().contextMenu}>
<Menu onSelect={value => this.menu_select(value)} style={this.styles().contextMenu}>
<MenuTrigger style={contextMenuStyle}>
<Icon name="md-more" style={this.styles().contextMenuTrigger} />
</MenuTrigger>
@@ -481,7 +481,7 @@ class ScreenHeaderComponent extends React.PureComponent {
</View>
{warningComps}
<DialogBox
ref={(dialogbox) => {
ref={dialogbox => {
this.dialogbox = dialogbox;
}}
/>
@@ -494,7 +494,7 @@ ScreenHeaderComponent.defaultProps = {
menuOptions: [],
};
const ScreenHeader = connect((state) => {
const ScreenHeader = connect(state => {
return {
historyCanGoBack: state.historyCanGoBack,
locale: state.settings.locale,

View File

@@ -23,7 +23,7 @@ class NoteTagsDialogComponent extends React.Component {
savingTags: false,
};
const noteHasTag = (tagId) => {
const noteHasTag = tagId => {
for (let i = 0; i < this.state.tagListData.length; i++) {
if (this.state.tagListData[i].id === tagId) return this.state.tagListData[i].selected;
}
@@ -33,11 +33,11 @@ class NoteTagsDialogComponent extends React.Component {
const newTagTitles = () => {
return this.state.newTags
.split(',')
.map((t) => t.trim().toLowerCase())
.filter((t) => !!t);
.map(t => t.trim().toLowerCase())
.filter(t => !!t);
};
this.tag_press = (tagId) => {
this.tag_press = tagId => {
const newData = this.state.tagListData.slice();
for (let i = 0; i < newData.length; i++) {
const t = newData[i];
@@ -52,7 +52,7 @@ class NoteTagsDialogComponent extends React.Component {
this.setState({ tagListData: newData });
};
this.renderTag = (data) => {
this.renderTag = data => {
const tag = data.item;
const iconName = noteHasTag(tag.id) ? 'md-checkbox-outline' : 'md-square-outline';
return (
@@ -71,7 +71,7 @@ class NoteTagsDialogComponent extends React.Component {
this.setState({ savingTags: true });
try {
const tagIds = this.state.tagListData.filter((t) => t.selected).map((t) => t.id);
const tagIds = this.state.tagListData.filter(t => t.selected).map(t => t.id);
await Tag.setNoteTagsByIds(this.state.noteId, tagIds);
const extraTitles = newTagTitles();
@@ -98,9 +98,9 @@ class NoteTagsDialogComponent extends React.Component {
async loadNoteTags(noteId) {
const tags = await Tag.tagsByNoteId(noteId);
const tagIds = tags.map((t) => t.id);
const tagIds = tags.map(t => t.id);
const tagListData = this.props.tags.map((tag) => {
const tagListData = this.props.tags.map(tag => {
return {
id: tag.id,
title: tag.title,
@@ -165,7 +165,7 @@ class NoteTagsDialogComponent extends React.Component {
selectionColor={theme.textSelectionColor}
keyboardAppearance={theme.keyboardAppearance}
value={this.state.newTags}
onChangeText={(value) => {
onChangeText={value => {
this.setState({ newTags: value });
}}
style={this.styles().newTagBoxInput}
@@ -179,7 +179,7 @@ class NoteTagsDialogComponent extends React.Component {
}
}
const NoteTagsDialog = connect((state) => {
const NoteTagsDialog = connect(state => {
return {
theme: state.settings.theme,
tags: state.tags,

View File

@@ -392,7 +392,7 @@ class ConfigScreenComponent extends BaseScreenComponent {
<Text key="label" style={this.styles().switchSettingText}>
{md.label()}
</Text>
<Switch key="control" style={this.styles().switchSettingControl} trackColor={{ false: theme.strongDividerColor }} value={value} onValueChange={(value) => updateSettingValue(key, value)} />
<Switch key="control" style={this.styles().switchSettingControl} trackColor={{ false: theme.strongDividerColor }} value={value} onValueChange={value => updateSettingValue(key, value)} />
</View>
{descriptionComp}
</View>
@@ -410,7 +410,7 @@ class ConfigScreenComponent extends BaseScreenComponent {
</Text>
<View style={{ display: 'flex', flexDirection: 'row', alignItems: 'center', flex: 1 }}>
<Text style={this.styles().sliderUnits}>{unitLabel}</Text>
<Slider key="control" style={{ flex: 1 }} step={md.step} minimumValue={md.minimum} maximumValue={md.maximum} value={value} onValueChange={(value) => updateSettingValue(key, value)} />
<Slider key="control" style={{ flex: 1 }} step={md.step} minimumValue={md.minimum} maximumValue={md.maximum} value={value} onValueChange={value => updateSettingValue(key, value)} />
</View>
</View>
);
@@ -420,7 +420,7 @@ class ConfigScreenComponent extends BaseScreenComponent {
<Text key="label" style={this.styles().settingText}>
{md.label()}
</Text>
<TextInput autoCorrect={false} autoCompleteType="off" selectionColor={theme.textSelectionColor} keyboardAppearance={theme.keyboardAppearance} autoCapitalize="none" key="control" style={this.styles().settingControl} value={value} onChangeText={(value) => updateSettingValue(key, value)} secureTextEntry={!!md.secure} />
<TextInput autoCorrect={false} autoCompleteType="off" selectionColor={theme.textSelectionColor} keyboardAppearance={theme.keyboardAppearance} autoCapitalize="none" key="control" style={this.styles().settingControl} value={value} onChangeText={value => updateSettingValue(key, value)} secureTextEntry={!!md.secure} />
</View>
);
} else {
@@ -557,7 +557,7 @@ class ConfigScreenComponent extends BaseScreenComponent {
}
}
const ConfigScreen = connect((state) => {
const ConfigScreen = connect(state => {
return {
settings: state.settings,
theme: state.settings.theme,

View File

@@ -16,7 +16,7 @@ class DropboxLoginScreenComponent extends BaseScreenComponent {
this.styles_ = {};
this.shared_ = new Shared(this, (msg) => dialogs.info(this, msg), (msg) => dialogs.error(this, msg));
this.shared_ = new Shared(this, msg => dialogs.info(this, msg), msg => dialogs.error(this, msg));
}
UNSAFE_componentWillMount() {
@@ -68,7 +68,7 @@ class DropboxLoginScreenComponent extends BaseScreenComponent {
</ScrollView>
<DialogBox
ref={(dialogbox) => {
ref={dialogbox => {
this.dialogbox = dialogbox;
}}
/>
@@ -77,7 +77,7 @@ class DropboxLoginScreenComponent extends BaseScreenComponent {
}
}
const DropboxLoginScreen = connect((state) => {
const DropboxLoginScreen = connect(state => {
return {
theme: state.settings.theme,
};

View File

@@ -103,7 +103,7 @@ class EncryptionConfigScreenComponent extends BaseScreenComponent {
return shared.onSavePasswordClick(this, mk);
};
const onPasswordChange = (text) => {
const onPasswordChange = text => {
return shared.onPasswordChange(this, mk, text);
};
@@ -120,7 +120,7 @@ class EncryptionConfigScreenComponent extends BaseScreenComponent {
<Text style={this.styles().normalText}>{_('Created: %s', time.formatMsToLocal(mk.created_time))}</Text>
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
<Text style={{ flex: 0, fontSize: theme.fontSize, marginRight: 10, color: theme.color }}>{_('Password:')}</Text>
<TextInput selectionColor={theme.textSelectionColor} keyboardAppearance={theme.keyboardAppearance} secureTextEntry={true} value={password} onChangeText={(text) => onPasswordChange(text)} style={inputStyle}></TextInput>
<TextInput selectionColor={theme.textSelectionColor} keyboardAppearance={theme.keyboardAppearance} secureTextEntry={true} value={password} onChangeText={text => onPasswordChange(text)} style={inputStyle}></TextInput>
<Text style={{ fontSize: theme.fontSize, marginRight: 10, color: theme.color }}>{passwordOk}</Text>
<Button title={_('Save')} onPress={() => onSaveClick()}></Button>
</View>
@@ -155,7 +155,7 @@ class EncryptionConfigScreenComponent extends BaseScreenComponent {
style={this.styles().normalTextInput}
secureTextEntry={true}
value={this.state.passwordPromptAnswer}
onChangeText={(text) => {
onChangeText={text => {
this.setState({ passwordPromptAnswer: text });
}}
></TextInput>
@@ -167,7 +167,7 @@ class EncryptionConfigScreenComponent extends BaseScreenComponent {
style={this.styles().normalTextInput}
secureTextEntry={true}
value={this.state.passwordPromptConfirmAnswer}
onChangeText={(text) => {
onChangeText={text => {
this.setState({ passwordPromptConfirmAnswer: text });
}}
></TextInput>
@@ -286,7 +286,7 @@ class EncryptionConfigScreenComponent extends BaseScreenComponent {
<View style={{ flex: 1, height: 20 }}></View>
</ScrollView>
<DialogBox
ref={(dialogbox) => {
ref={dialogbox => {
this.dialogbox = dialogbox;
}}
/>
@@ -295,7 +295,7 @@ class EncryptionConfigScreenComponent extends BaseScreenComponent {
}
}
const EncryptionConfigScreen = connect((state) => {
const EncryptionConfigScreen = connect(state => {
return {
theme: state.settings.theme,
masterKeys: state.masterKeys,

View File

@@ -50,7 +50,7 @@ class FolderScreenComponent extends BaseScreenComponent {
lastSavedFolder: Object.assign({}, folder),
});
} else {
Folder.load(this.props.folderId).then((folder) => {
Folder.load(this.props.folderId).then(folder => {
this.setState({
folder: folder,
lastSavedFolder: Object.assign({}, folder),
@@ -107,9 +107,9 @@ class FolderScreenComponent extends BaseScreenComponent {
return (
<View style={this.rootStyle(this.props.theme).root}>
<ScreenHeader title={_('Edit notebook')} showSaveButton={true} saveButtonDisabled={saveButtonDisabled} onSaveButtonPress={() => this.saveFolderButton_press()} showSideMenuButton={false} showSearchButton={false} />
<TextInput placeholder={_('Enter notebook title')} placeholderTextColor={theme.colorFaded} underlineColorAndroid={theme.strongDividerColor} selectionColor={theme.textSelectionColor} keyboardAppearance={theme.keyboardAppearance} style={this.styles().textInput} autoFocus={true} value={this.state.folder.title} onChangeText={(text) => this.title_changeText(text)} />
<TextInput placeholder={_('Enter notebook title')} placeholderTextColor={theme.colorFaded} underlineColorAndroid={theme.strongDividerColor} selectionColor={theme.textSelectionColor} keyboardAppearance={theme.keyboardAppearance} style={this.styles().textInput} autoFocus={true} value={this.state.folder.title} onChangeText={text => this.title_changeText(text)} />
<dialogs.DialogBox
ref={(dialogbox) => {
ref={dialogbox => {
this.dialogbox = dialogbox;
}}
/>
@@ -118,7 +118,7 @@ class FolderScreenComponent extends BaseScreenComponent {
}
}
const FolderScreen = connect((state) => {
const FolderScreen = connect(state => {
return {
folderId: state.selectedFolderId,
theme: state.settings.theme,

View File

@@ -101,7 +101,7 @@ class LogScreenComponent extends BaseScreenComponent {
<FlatList
data={this.state.logEntries}
renderItem={renderRow}
keyExtractor={(item) => { return `${item.id}`; }}
keyExtractor={item => { return `${item.id}`; }}
/>
<View style={{ flexDirection: 'row' }}>
<View style={{ flex: 1, marginRight: 5 }}>
@@ -126,7 +126,7 @@ class LogScreenComponent extends BaseScreenComponent {
}
}
const LogScreen = connect((state) => {
const LogScreen = connect(state => {
return {
theme: state.settings.theme,
};

View File

@@ -130,7 +130,7 @@ class NoteScreenComponent extends BaseScreenComponent {
this.setState({ noteTagDialogShown: false });
};
this.onJoplinLinkClick_ = async (msg) => {
this.onJoplinLinkClick_ = async msg => {
try {
if (msg.indexOf('joplin://') === 0) {
const resourceUrlInfo = urlUtils.parseResourceUrl(msg);
@@ -411,7 +411,7 @@ class NoteScreenComponent extends BaseScreenComponent {
(width, height) => {
resolve({ width: width, height: height });
},
(error) => {
error => {
reject(error);
}
);
@@ -420,7 +420,7 @@ class NoteScreenComponent extends BaseScreenComponent {
showImagePicker(options) {
return new Promise((resolve) => {
ImagePicker.launchImageLibrary(options, (response) => {
ImagePicker.launchImageLibrary(options, response => {
resolve(response);
});
});
@@ -883,7 +883,7 @@ class NoteScreenComponent extends BaseScreenComponent {
let bodyComponent = null;
if (this.state.mode == 'view' && !Setting.value('editor.beta')) {
const onCheckboxChange = (newBody) => {
const onCheckboxChange = newBody => {
this.saveOneProperty('body', newBody);
};
@@ -911,7 +911,7 @@ class NoteScreenComponent extends BaseScreenComponent {
highlightedKeywords={keywords}
theme={this.props.theme}
noteHash={this.props.noteHash}
onCheckboxChange={(newBody) => {
onCheckboxChange={newBody => {
onCheckboxChange(newBody);
}}
onMarkForDownload={this.onMarkForDownload}
@@ -935,7 +935,7 @@ class NoteScreenComponent extends BaseScreenComponent {
keywords = SearchEngine.instance().allParsedQueryTerms(parsedQuery);
}
const onCheckboxChange = (newBody) => {
const onCheckboxChange = newBody => {
this.saveOneProperty('body', newBody);
};
@@ -950,7 +950,7 @@ class NoteScreenComponent extends BaseScreenComponent {
value={note.body}
borderColor={this.styles().markdownButtons.borderColor}
markdownButtonsColor={this.styles().markdownButtons.color}
saveText={(text) => this.body_changeText(text)}
saveText={text => this.body_changeText(text)}
blurOnSubmit={false}
selectionColor={theme.textSelectionColor}
keyboardAppearance={theme.keyboardAppearance}
@@ -969,7 +969,7 @@ class NoteScreenComponent extends BaseScreenComponent {
highlightedKeywords: keywords,
theme: this.props.theme,
noteHash: this.props.noteHash,
onCheckboxChange: (newBody) => {
onCheckboxChange: newBody => {
onCheckboxChange(newBody);
},
onMarkForDownload: this.onMarkForDownload,
@@ -1058,7 +1058,7 @@ class NoteScreenComponent extends BaseScreenComponent {
<SelectDateTimeDialog shown={this.state.alarmDialogShown} date={dueDate} onAccept={this.onAlarmDialogAccept} onReject={this.onAlarmDialogReject} />
<DialogBox
ref={(dialogbox) => {
ref={dialogbox => {
this.dialogbox = dialogbox;
}}
/>
@@ -1068,7 +1068,7 @@ class NoteScreenComponent extends BaseScreenComponent {
}
}
const NoteScreen = connect((state) => {
const NoteScreen = connect(state => {
return {
noteId: state.selectedNoteIds.length ? state.selectedNoteIds[0] : null,
noteHash: state.selectedNoteHash,

View File

@@ -151,7 +151,7 @@ class NotesScreenComponent extends BaseScreenComponent {
}
deleteFolder_onPress(folderId) {
dialogs.confirm(this, _('Delete notebook? All notes and sub-notebooks within this notebook will also be deleted.')).then((ok) => {
dialogs.confirm(this, _('Delete notebook? All notes and sub-notebooks within this notebook will also be deleted.')).then(ok => {
if (!ok) return;
Folder.delete(folderId)
@@ -162,7 +162,7 @@ class NotesScreenComponent extends BaseScreenComponent {
smartFilterId: 'c3176726992c11e9ac940492261af972',
});
})
.catch((error) => {
.catch(error => {
alert(error.message);
});
});
@@ -237,7 +237,7 @@ class NotesScreenComponent extends BaseScreenComponent {
<NoteList style={this.styles().noteList} />
{actionButtonComp}
<DialogBox
ref={(dialogbox) => {
ref={dialogbox => {
this.dialogbox = dialogbox;
}}
/>
@@ -246,7 +246,7 @@ class NotesScreenComponent extends BaseScreenComponent {
}
}
const NotesScreen = connect((state) => {
const NotesScreen = connect(state => {
return {
folders: state.folders,
tags: state.tags,

View File

@@ -98,7 +98,7 @@ class OneDriveLoginScreenComponent extends BaseScreenComponent {
<ScreenHeader title={_('Login with OneDrive')} />
<WebView
source={source}
onNavigationStateChange={(o) => {
onNavigationStateChange={o => {
this.webview_load(o);
}}
onError={() => {

View File

@@ -178,7 +178,7 @@ class SearchScreenComponent extends BaseScreenComponent {
onSubmitEditing={() => {
this.searchTextInput_submit();
}}
onChangeText={(text) => this.searchTextInput_changeText(text)}
onChangeText={text => this.searchTextInput_changeText(text)}
value={this.state.query}
selectionColor={theme.textSelectionColor}
keyboardAppearance={theme.keyboardAppearance}
@@ -188,10 +188,10 @@ class SearchScreenComponent extends BaseScreenComponent {
</TouchableHighlight>
</View>
<FlatList data={this.state.notes} keyExtractor={(item) => item.id} renderItem={(event) => <NoteItem note={event.item} />} />
<FlatList data={this.state.notes} keyExtractor={(item) => item.id} renderItem={event => <NoteItem note={event.item} />} />
</View>
<DialogBox
ref={(dialogbox) => {
ref={dialogbox => {
this.dialogbox = dialogbox;
}}
/>
@@ -200,7 +200,7 @@ class SearchScreenComponent extends BaseScreenComponent {
}
}
const SearchScreen = connect((state) => {
const SearchScreen = connect(state => {
return {
query: state.searchQuery,
theme: state.settings.theme,

View File

@@ -41,7 +41,7 @@ class StatusScreenComponent extends BaseScreenComponent {
render() {
const theme = themeStyle(this.props.theme);
const renderBody = (report) => {
const renderBody = report => {
const baseStyle = {
paddingLeft: 6,
paddingRight: 6,
@@ -144,7 +144,7 @@ class StatusScreenComponent extends BaseScreenComponent {
}
}
const StatusScreen = connect((state) => {
const StatusScreen = connect(state => {
return {
theme: state.settings.theme,
};

View File

@@ -105,7 +105,7 @@ class TagsScreenComponent extends BaseScreenComponent {
}
}
const TagsScreen = connect((state) => {
const TagsScreen = connect(state => {
return {
theme: state.settings.theme,
};

View File

@@ -18,7 +18,7 @@ shared.init = function(comp) {
};
shared.advancedSettingsButton_click = (comp) => {
comp.setState((state) => {
comp.setState(state => {
return { showAdvancedSettings: !state.showAdvancedSettings };
});
};
@@ -79,7 +79,7 @@ shared.checkNextcloudApp = async function(comp, settings) {
};
shared.updateSettingValue = function(comp, key, value) {
comp.setState((state) => {
comp.setState(state => {
const settings = Object.assign({}, state.settings);
const changedSettingKeys = state.changedSettingKeys.slice();
settings[key] = Setting.formatValue(key, value);

View File

@@ -21,7 +21,7 @@ class Shared {
shim.openUrl(this.comp_.state.loginUrl);
};
this.authCodeInput_change = (event) => {
this.authCodeInput_change = event => {
this.comp_.setState({
authCode: typeof event === 'object' ? event.target.value : event,
});

View File

@@ -102,7 +102,7 @@ shared.saveNoteButton_press = async function(comp, folderId = null, options = nu
comp.setState(newState);
if (isProvisionalNote) {
Note.updateGeolocation(note.id).then((geoNote) => {
Note.updateGeolocation(note.id).then(geoNote => {
const stateNote = comp.state.note;
if (!stateNote || !geoNote) return;
if (stateNote.id !== geoNote.id) return; // Another note has been loaded while geoloc was being retrieved

View File

@@ -106,7 +106,7 @@ class SideMenuContentNoteComponent extends Component {
}
}
const SideMenuContentNote = connect((state) => {
const SideMenuContentNote = connect(state => {
return {
theme: state.settings.theme,
};

View File

@@ -388,7 +388,7 @@ class SideMenuContentComponent extends Component {
}
}
const SideMenuContent = connect((state) => {
const SideMenuContent = connect(state => {
return {
folders: state.folders,
syncStarted: state.syncStarted,

View File

@@ -3,7 +3,7 @@ const SideMenu_ = require('react-native-side-menu').default;
class SideMenuComponent extends SideMenu_ {}
const MySideMenu = connect((state) => {
const MySideMenu = connect(state => {
return {
isOpen: state.showSideMenu,
};