[Gekidou] Refactor storage layer (#5471)

* Refactored storage layer - in progress

* Refactored DatabaseManager & Operators

* Renamed isRecordAppEqualToRaw to isRecordInfoEqualToRaw

* Review feedback

* Update app/database/models/app/info.ts

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>

* Update app/database/models/server/my_team.ts

Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>

Co-authored-by: Avinash Lingaloo <>
Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
This commit is contained in:
Elias Nahum
2021-06-21 17:06:18 -04:00
committed by GitHub
parent 6f6d88f4d7
commit 17e832e689
156 changed files with 4125 additions and 5403 deletions

View File

@@ -5,7 +5,7 @@ import {Linking} from 'react-native';
import {Notifications} from 'react-native-notifications';
import {Screens} from '@constants';
import {getActiveServerCredentials, getServerCredentials} from '@init/credentials';
import {getActiveServerUrl, getServerCredentials} from '@init/credentials';
import {goToScreen, resetToChannel, resetToSelectServer} from '@screens/navigation';
import {DeepLinkChannel, DeepLinkDM, DeepLinkGM, DeepLinkPermalink, DeepLinkType, DeepLinkWithData, LaunchProps, LaunchType} from '@typings/launch';
import {parseDeepLink} from '@utils/url';
@@ -52,11 +52,14 @@ const launchApp = async (props: LaunchProps, resetNavigation = true) => {
}
}
const credentials = serverUrl ? await getServerCredentials(serverUrl) : await getActiveServerCredentials();
serverUrl = await getActiveServerUrl();
if (serverUrl) {
const credentials = await getServerCredentials(serverUrl);
if (credentials) {
launchToChannel(props, resetNavigation);
return;
if (credentials) {
launchToChannel({...props, serverUrl}, resetNavigation);
return;
}
}
launchToServer(props, resetNavigation);