[FIX] getSettings not catching errors (#2271)

This commit is contained in:
Diego Mello 2020-07-09 10:33:04 -03:00 committed by GitHub
parent aef7125887
commit f3b02a6a88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 35 additions and 37 deletions

View File

@ -1,4 +1,3 @@
import { InteractionManager } from 'react-native';
import { sanitizedRaw } from '@nozbe/watermelondb/RawRecord'; import { sanitizedRaw } from '@nozbe/watermelondb/RawRecord';
import { Q } from '@nozbe/watermelondb'; import { Q } from '@nozbe/watermelondb';
@ -132,7 +131,7 @@ export default async function() {
const filteredSettingsIds = filteredSettings.map(s => s._id); const filteredSettingsIds = filteredSettings.map(s => s._id);
reduxStore.dispatch(addSettings(this.parseSettings(filteredSettings))); reduxStore.dispatch(addSettings(this.parseSettings(filteredSettings)));
InteractionManager.runAfterInteractions(async() => {
// filter server info // filter server info
const serverInfo = filteredSettings.filter(i1 => serverInfoKeys.includes(i1._id)); const serverInfo = filteredSettings.filter(i1 => serverInfoKeys.includes(i1._id));
const iconSetting = data.find(item => item._id === 'Assets_favicon_512'); const iconSetting = data.find(item => item._id === 'Assets_favicon_512');
@ -174,7 +173,6 @@ export default async function() {
} }
return allRecords.length; return allRecords.length;
}); });
});
} catch (e) { } catch (e) {
log(e); log(e);
} }