Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

change sync button position

ammarahm-edfb76ed5b223a
diff --git a/apps/mobile/src/components/Header/HeaderRightMenu.js b/apps/mobile/src/components/Header/HeaderRightMenu.js
index eb38ce59f..4ce284712 100644
--- a/apps/mobile/src/components/Header/HeaderRightMenu.js
+++ b/apps/mobile/src/components/Header/HeaderRightMenu.js
@@ -1,19 +1,21 @@
import React from 'react';
-import {StyleSheet, View} from 'react-native';
+import {ActivityIndicator, StyleSheet, View} from 'react-native';
import {useTracked} from '../../provider';
import {DDS} from '../../services/DeviceDetection';
import NavigationService from '../../services/Navigation';
import {dWidth} from '../../utils';
import {SIZE} from '../../utils/SizeUtils';
import {ActionIcon} from '../ActionIcon';
-import { Button } from '../Button';
+import {Button} from '../Button';
export const HeaderRightMenu = () => {
- const [state,] = useTracked();
- const {colors, containerBottomButton,currentScreen} = state;
+ const [state] = useTracked();
+ const {colors, containerBottomButton, currentScreen, syncing} = state;
return (
<View style={styles.rightBtnContainer}>
+ {syncing && <ActivityIndicator size={SIZE.xl} color={colors.accent} />}
+
<ActionIcon
onPress={async () => {
NavigationService.navigate('Search');
@@ -23,20 +25,19 @@ export const HeaderRightMenu = () => {
color={colors.pri}
customStyle={styles.rightBtn}
/>
+
{DDS.isLargeTablet() && containerBottomButton.onPress ? (
<Button
- onPress={ () => {
-
- containerBottomButton.onPress()
-
+ onPress={() => {
+ containerBottomButton.onPress();
}}
- icon={currentScreen === "trash" ? "delete" : 'plus'}
+ icon={currentScreen === 'trash' ? 'delete' : 'plus'}
iconSize={SIZE.xl}
type="shade"
style={{
marginLeft: 20,
- width:60,
- height:35
+ width: 60,
+ height: 35,
}}
/>
) : null}
diff --git a/apps/mobile/src/components/Header/HeaderTitle.js b/apps/mobile/src/components/Header/HeaderTitle.js
index e13a27135..f1837f302 100644
--- a/apps/mobile/src/components/Header/HeaderTitle.js
+++ b/apps/mobile/src/components/Header/HeaderTitle.js
@@ -1,5 +1,5 @@
import React, {useEffect} from 'react';
-import {Text} from 'react-native';
+import {ActivityIndicator, Text} from 'react-native';
import Animated from 'react-native-reanimated';
import {useTracked} from '../../provider';
import {DDS} from '../../services/DeviceDetection';
diff --git a/apps/mobile/src/components/Header/index.js b/apps/mobile/src/components/Header/index.js
index 12018044e..ceedaaef4 100644
--- a/apps/mobile/src/components/Header/index.js
+++ b/apps/mobile/src/components/Header/index.js
@@ -1,5 +1,5 @@
import React, { useEffect, useState } from 'react';
-import { ActivityIndicator, Platform, StyleSheet, View } from 'react-native';
+import { Platform, StyleSheet, View } from 'react-native';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import { useTracked } from '../../provider';
import { eSubscribeEvent, eUnSubscribeEvent } from '../../services/EventManager';
@@ -15,7 +15,7 @@ import { HeaderTitle } from './HeaderTitle';
export const Header = ({root}) => {
const [state] = useTracked();
- const {colors, syncing, currentScreen} = state;
+ const {colors, currentScreen} = state;
const insets = useSafeAreaInsets();
const [hide, setHide] = useState(true);
@@ -67,24 +67,6 @@ export const Header = ({root}) => {
</View>
) : null}
- <View
- style={[
- styles.loadingContainer,
- {
- opacity: syncing ? 1 : 0,
- },
- ]}>
- <View
- style={[
- styles.loadingInnerContainer,
- {
- backgroundColor: colors.bg,
- },
- ]}
- />
- <ActivityIndicator size={25} color={colors.accent} />
- </View>
-
{currentScreen === 'search' ? (
<View style={styles.rightBtnContainer}>
<ActionIcon