fixing to settimeouts
This commit is contained in:
parent
29394335af
commit
57f58f2c02
@ -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()
|
||||
|
@ -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)
|
||||
|
||||
navigation.navigate(name)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user