[Gekidou] Avoid technical debt (#5795)

* Apply Status bar color

* useIsTablet hook instead of useSplitView in combination with the constant

* Constants clean up
This commit is contained in:
Elias Nahum
2021-10-28 10:15:17 -03:00
committed by GitHub
parent f62822fe52
commit fbd8b92194
55 changed files with 185 additions and 472 deletions

View File

@@ -3,7 +3,7 @@
import {DeviceEventEmitter} from 'react-native';
import {General} from '@constants';
import {Events} from '@constants';
import {t} from '@i18n';
import {Analytics, create} from '@init/analytics';
import {setServerCredentials} from '@init/credentials';
@@ -233,7 +233,7 @@ export default class ClientBase {
const hasCacheControl = Boolean(headers[ClientConstants.HEADER_CACHE_CONTROL] || headers[ClientConstants.HEADER_CACHE_CONTROL.toLowerCase()]);
if (serverVersion && !hasCacheControl && this.serverVersion !== serverVersion) {
this.serverVersion = serverVersion;
DeviceEventEmitter.emit(General.SERVER_VERSION_CHANGED, {serverUrl: this.apiClient.baseUrl, serverVersion});
DeviceEventEmitter.emit(Events.SERVER_VERSION_CHANGED, {serverUrl: this.apiClient.baseUrl, serverVersion});
}
const bearerToken = headers[ClientConstants.HEADER_TOKEN] || headers[ClientConstants.HEADER_TOKEN.toLowerCase()];