diff --git a/react-native/app/pages/list_portals/component.tsx b/react-native/app/pages/list_portals/component.tsx index 1eead86..969ec3f 100644 --- a/react-native/app/pages/list_portals/component.tsx +++ b/react-native/app/pages/list_portals/component.tsx @@ -102,6 +102,7 @@ export const ListPortals = ({ navigation }: IListPortalsDTO)=>{ closeOnRowPress={true} closeOnRowOpen={true} onRowOpen={(rowKey, rowMap) => { + //This timeout is recommended https://github.com/jemise111/react-native-swipe-list-view/blob/master/docs/migrating-to-flatlist.md setTimeout(() => { if(rowMap[rowKey] != undefined){ rowMap[rowKey].closeRow() diff --git a/react-native/app/pages/store_portals/component.tsx b/react-native/app/pages/store_portals/component.tsx index c772ff6..6f3d665 100644 --- a/react-native/app/pages/store_portals/component.tsx +++ b/react-native/app/pages/store_portals/component.tsx @@ -18,12 +18,9 @@ export const StorePortals = ({navigation, modalizeRef}:IStore)=>{ portalsStorage = await AsyncStorage.getItem('portal') portalsStorage = portalsStorage ? JSON.parse(portalsStorage) : null portalsStorage.push({name, url}) - await AsyncStorage.setItem('portal', JSON.stringify(portalsStorage)) + AsyncStorage.setItem('portal', JSON.stringify(portalsStorage)) setPortals(portalsStorage) - setTimeout(()=>{ - modalizeRef?.current?.close(); - }, 500) - + modalizeRef?.current?.close(); navigation.navigate(name) } diff --git a/react-native/bootstrap/sdk/container.tsx b/react-native/bootstrap/sdk/container.tsx index 9d9e4c0..2f2552c 100644 --- a/react-native/bootstrap/sdk/container.tsx +++ b/react-native/bootstrap/sdk/container.tsx @@ -29,4 +29,4 @@ const styles = StyleSheet.create({ marginTop: Platform.select({ios: 20, android: 0}), flex: 1, }, - }); \ No newline at end of file +}); \ No newline at end of file