Compare commits

...

3 commits

Author SHA1 Message Date
Arnaud Vergnet
aaf72d9122 feat: render planex in incognito mode
Should hopefully fix the old planning being rendered issue
2021-09-18 11:52:50 +02:00
Arnaud Vergnet
1a696f0628 fix: infinite refresh if no internet 2021-09-18 11:45:29 +02:00
Arnaud Vergnet
9acfbf00df feat: change game piece colors 2021-09-18 11:30:24 +02:00
4 changed files with 21 additions and 16 deletions

View file

@ -127,6 +127,7 @@ function PlanexWebview(props: Props) {
onMessage={props.onMessage}
showAdvancedControls={false}
showControls={props.currentGroup !== undefined}
incognito={true}
/>
{!props.currentGroup ? (
<ErrorView

View file

@ -71,7 +71,8 @@ export default function RequestScreen<T>(props: Props<T>) {
if (props.refresh !== lastRefresh.current) {
lastRefresh.current = props.refresh === true;
}
}, [props, loading, refreshData]);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [props, loading]);
useFocusEffect(
React.useCallback(() => {
@ -89,7 +90,8 @@ export default function RequestScreen<T>(props: Props<T>) {
clearInterval(refreshInterval.current);
}
};
}, [props.cache, props.refreshOnFocus, props.autoRefreshTime, refreshData])
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [props.cache, props.refreshOnFocus, props.autoRefreshTime])
);
const isErrorCritical = (e: API_REQUEST_CODES | undefined) => {

View file

@ -58,6 +58,7 @@ type Props = {
customPaddingFunction?: null | ((padding: number) => string);
showAdvancedControls?: boolean;
showControls?: boolean;
incognito?: boolean;
};
const AnimatedWebView = Animated.createAnimatedComponent(WebView);
@ -272,6 +273,7 @@ function WebViewScreen(props: Props) {
onLoad={() => injectJavaScript(getJavascriptPadding(containerPaddingTop))}
// Animations
onScroll={onScrollWithListener(onScroll)}
incognito={props.incognito}
/>
);
}

View file

@ -101,13 +101,13 @@ export const CustomWhiteTheme: ReactNativePaper.Theme = {
// Tetris
tetrisBackground: '#f0f0f0',
tetrisScore: '#e2bd33',
tetrisI: '#3cd9e6',
tetrisO: '#ffdd00',
tetrisT: '#a716e5',
tetrisS: '#09c528',
tetrisZ: '#ff0009',
tetrisJ: '#2a67e3',
tetrisL: '#da742d',
tetrisI: '#be1522',
tetrisO: '#EB6C1F',
tetrisT: '#5cb85c',
tetrisS: '#5294E2',
tetrisZ: '#dede00',
tetrisJ: '#69009d',
tetrisL: '#553716',
gameGold: '#ffd610',
gameSilver: '#7b7b7b',
@ -160,13 +160,13 @@ export const CustomDarkTheme: ReactNativePaper.Theme = {
// Tetris
tetrisBackground: '#181818',
tetrisScore: '#e2d707',
tetrisI: '#30b3be',
tetrisO: '#c1a700',
tetrisT: '#9114c7',
tetrisS: '#08a121',
tetrisZ: '#b50008',
tetrisJ: '#0f37b9',
tetrisL: '#b96226',
tetrisI: '#be1522',
tetrisO: '#EB6C1F',
tetrisT: '#5cb85c',
tetrisS: '#5294E2',
tetrisZ: '#dede00',
tetrisJ: '#69009d',
tetrisL: '#553716',
gameGold: '#ffd610',
gameSilver: '#7b7b7b',