mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
update notes-core
This commit is contained in:
@@ -242,8 +242,10 @@ const App = () => {
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const loadMainApp = () => {
|
const loadMainApp = () => {
|
||||||
|
console.log('main app loadinggggg');
|
||||||
dispatch({type: Actions.ALL});
|
dispatch({type: Actions.ALL});
|
||||||
AppRootView = require('./initializer.root').RootView;
|
AppRootView = require('./initializer.root').RootView;
|
||||||
|
sleep(100).then(() => SplashScreen.hide());
|
||||||
getUser().then(console.log).catch(console.log);
|
getUser().then(console.log).catch(console.log);
|
||||||
backupData().then((r) => r);
|
backupData().then((r) => r);
|
||||||
sleep(500).then(() => (appInit = true));
|
sleep(500).then(() => (appInit = true));
|
||||||
@@ -286,6 +288,7 @@ const App = () => {
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const runAfterInit = () => {
|
const runAfterInit = () => {
|
||||||
|
let isIntent = false;
|
||||||
IntentService.getIntent()
|
IntentService.getIntent()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
AppRootView = require('./initializer.intent').IntentView;
|
AppRootView = require('./initializer.intent').IntentView;
|
||||||
@@ -294,13 +297,17 @@ const App = () => {
|
|||||||
intentInit = true;
|
intentInit = true;
|
||||||
dispatch({type: Actions.ALL});
|
dispatch({type: Actions.ALL});
|
||||||
setIntent(true);
|
setIntent(true);
|
||||||
|
isIntent = true;
|
||||||
ReceiveSharingIntent.clearFileNames();
|
ReceiveSharingIntent.clearFileNames();
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => console.log)
|
||||||
console.log(e, 'no intent recieved');
|
.finally(() => {
|
||||||
|
if (!isIntent) {
|
||||||
|
console.log('no intent recieved');
|
||||||
ReceiveSharingIntent.clearFileNames();
|
ReceiveSharingIntent.clearFileNames();
|
||||||
intentInit = true;
|
intentInit = true;
|
||||||
loadMainApp();
|
loadMainApp();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import {
|
|||||||
eSubscribeEvent,
|
eSubscribeEvent,
|
||||||
eUnSubscribeEvent,
|
eUnSubscribeEvent,
|
||||||
} from './src/services/EventManager';
|
} from './src/services/EventManager';
|
||||||
|
import IntentService from './src/services/IntentService';
|
||||||
import SettingsService from './src/services/SettingsService';
|
import SettingsService from './src/services/SettingsService';
|
||||||
import {editing, setWidthHeight} from './src/utils';
|
import {editing, setWidthHeight} from './src/utils';
|
||||||
import {
|
import {
|
||||||
@@ -196,10 +197,6 @@ const AppStack = React.memo(
|
|||||||
} else {
|
} else {
|
||||||
setDeviceMode('mobile', size);
|
setDeviceMode('mobile', size);
|
||||||
}
|
}
|
||||||
if (!SettingsService.getApploaded()) {
|
|
||||||
eSendEvent('nointent');
|
|
||||||
}
|
|
||||||
sleep(100).then(() => SplashScreen.hide() )
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function setDeviceMode(current, size) {
|
function setDeviceMode(current, size) {
|
||||||
|
|||||||
@@ -73,12 +73,9 @@ const SimpleList = ({
|
|||||||
}, [listData, searchResults.results]);
|
}, [listData, searchResults.results]);
|
||||||
|
|
||||||
const loadData = () => {
|
const loadData = () => {
|
||||||
sleep(500).then(()=> {
|
if (listData || listData.length === 0) {
|
||||||
let mainData = [header, {type: 'empty'}];
|
setDataProvider(dataProvider.cloneWithRows([header, ...listData]));
|
||||||
mainData =
|
}
|
||||||
!listData || listData.length === 0 ? mainData : [header, ...listData];
|
|
||||||
setDataProvider(dataProvider.cloneWithRows(mainData));
|
|
||||||
})
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const RenderSectionHeader = ({item, index}) => (
|
const RenderSectionHeader = ({item, index}) => (
|
||||||
|
|||||||
Reference in New Issue
Block a user