Skip to content

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

fix list jumping to top

ammarahm-ed081adcd01f61
diff --git a/apps/mobile/src/components/SimpleList/index.js b/apps/mobile/src/components/SimpleList/index.js
index 24d7fb7d4..b15c1a851 100644
--- a/apps/mobile/src/components/SimpleList/index.js
+++ b/apps/mobile/src/components/SimpleList/index.js
@@ -69,7 +69,9 @@ const SimpleList = ({
useEffect(() => {
if (!loading) {
setDataProvider(
- listData.length >= 1 && SettingsService.get().homepage !== screen
+ dataProvider.length < 2 &&
+ listData.length >= 1 &&
+ SettingsService.get().homepage !== screen
? listData.slice(0, 1)
: listData,
);
diff --git a/apps/mobile/src/views/Notes/index.js b/apps/mobile/src/views/Notes/index.js
index d013a48a2..73d1e59df 100644
--- a/apps/mobile/src/views/Notes/index.js
+++ b/apps/mobile/src/views/Notes/index.js
@@ -6,7 +6,7 @@ import {Header} from '../../components/Header';
import SelectionHeader from '../../components/SelectionHeader';
import SimpleList from '../../components/SimpleList';
import {useTracked} from '../../provider';
-import { useNoteStore } from '../../provider/stores';
+import {useNoteStore} from '../../provider/stores';
import {DDS} from '../../services/DeviceDetection';
import {
eSendEvent,
@@ -27,8 +27,8 @@ import {tabBarRef} from '../../utils/Refs';
export const Notes = ({route, navigation}) => {
const [notes, setNotes] = useState([]);
- const loading = useNoteStore(state =>state.loading);
-
+ const loading = useNoteStore(state => state.loading);
+
let params = route.params ? route.params : null;
let ranAfterInteractions = false;
@@ -52,7 +52,7 @@ export const Notes = ({route, navigation}) => {
) {
Navigation.goBack();
}
- console.log('setting notes');
+ console.log('setting notess');
setNotes(_notes);
if (params.menu) {
navigation.setOptions({