Skip to content

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

scroll fix

ammarahm-edf52de3fa425e
diff --git a/apps/mobile/src/components/ActionSheetComponent/ActionSheetWrapper.js b/apps/mobile/src/components/ActionSheetComponent/ActionSheetWrapper.js
index b487f45c8..1138a3204 100644
--- a/apps/mobile/src/components/ActionSheetComponent/ActionSheetWrapper.js
+++ b/apps/mobile/src/components/ActionSheetComponent/ActionSheetWrapper.js
@@ -17,12 +17,12 @@ const ActionSheetWrapper = ({
const [state] = useTracked();
const {colors} = state;
const largeTablet = DDS.isLargeTablet();
+ const smallTablet = DDS.isTab;
const style = React.useMemo(() => {
return {
- width: largeTablet ? 500 : '100%',
- minHeight: largeTablet ? 100 : null,
- maxHeight: largeTablet ? 500 : '90%',
+ width: largeTablet || smallTablet ? 500 : '100%',
+ maxHeight: largeTablet ? 500 : '100%',
borderTopRightRadius: 10,
borderTopLeftRadius: 10,
backgroundColor: colors.bg,
diff --git a/apps/mobile/src/components/ActionSheetComponent/index.js b/apps/mobile/src/components/ActionSheetComponent/index.js
index 17d36c0a9..5feb4a9c6 100644
--- a/apps/mobile/src/components/ActionSheetComponent/index.js
+++ b/apps/mobile/src/components/ActionSheetComponent/index.js
@@ -57,6 +57,7 @@ export const ActionSheetComponent = ({
hasTags = false,
rowItems = [],
columnItems = [],
+ getRef,
}) => {
const [state, dispatch] = useTracked();
const {colors, premiumUser, user} = state;
@@ -511,8 +512,16 @@ export const ActionSheetComponent = ({
}
};
+ const onScrollEnd = () => {
+ getRef().current?.childScrollHandler();
+ };
+
return (
<ScrollView
+ nestedScrollEnabled
+ onScrollEndDrag={onScrollEnd}
+ onScrollAnimationEnd={onScrollEnd}
+ onMomentumScrollEnd={onScrollEnd}
onLayout={() => {
if (!item.dateDeleted) {
localRefresh(item.type, true);
@@ -522,8 +531,8 @@ export const ActionSheetComponent = ({
paddingBottom: 30,
backgroundColor: colors.bg,
paddingHorizontal: 0,
- borderBottomRightRadius:DDS.isLargeTablet()? 10 : 1,
- borderBottomLeftRadius:DDS.isLargeTablet()? 10 : 1
+ borderBottomRightRadius: DDS.isLargeTablet() ? 10 : 1,
+ borderBottomLeftRadius: DDS.isLargeTablet() ? 10 : 1,
}}>
<TouchableOpacity
style={{
diff --git a/apps/mobile/src/components/DialogManager/index.js b/apps/mobile/src/components/DialogManager/index.js
index 2c8a87898..07ac9cd71 100644
--- a/apps/mobile/src/components/DialogManager/index.js
+++ b/apps/mobile/src/components/DialogManager/index.js
@@ -301,7 +301,6 @@ export class DialogManager extends Component {
render() {
let {colors} = this.props;
let {actionSheetData, item, simpleDialog} = this.state;
- console.log(DDS.isLargeTablet())
return (
<>
{!this.state.actionSheetVisible ? null : (
@@ -319,6 +318,7 @@ export class DialogManager extends Component {
setWillRefresh={(value) => {
this.willRefresh = true;
}}
+ getRef={() => this.actionSheet}
hasColors={actionSheetData.colors}
hasTags={actionSheetData.colors}
overlayColor={
diff --git a/apps/mobile/src/components/MoveNoteDialog/index.js b/apps/mobile/src/components/MoveNoteDialog/index.js
index e2e55bfe2..d060667c8 100644
--- a/apps/mobile/src/components/MoveNoteDialog/index.js
+++ b/apps/mobile/src/components/MoveNoteDialog/index.js
@@ -1,35 +1,33 @@
-import React, {createRef, useEffect, useState} from 'react';
+import React, { createRef, useEffect, useState } from 'react';
import {
FlatList,
Keyboard,
ScrollView,
TextInput,
TouchableOpacity,
- View,
+ View
} from 'react-native';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
-import {notesnook} from '../../../e2e/test.ids';
-import {useTracked} from '../../provider';
-import {Actions} from '../../provider/Actions';
-import {DDS} from '../../services/DeviceDetection';
+import { notesnook } from '../../../e2e/test.ids';
+import { useTracked } from '../../provider';
+import { Actions } from '../../provider/Actions';
import {
eSendEvent,
eSubscribeEvent,
eUnSubscribeEvent,
- ToastEvent,
+ ToastEvent
} from '../../services/EventManager';
-import {db} from '../../utils/DB';
+import { db } from '../../utils/DB';
import {
eOnNewTopicAdded,
eOpenMoveNoteDialog,
- refreshNotesPage,
+ refreshNotesPage
} from '../../utils/Events';
-import {pv, SIZE, WEIGHT} from '../../utils/SizeUtils';
-import ActionSheet from '../ActionSheet';
+import { pv, SIZE, WEIGHT } from '../../utils/SizeUtils';
import ActionSheetWrapper from '../ActionSheetComponent/ActionSheetWrapper';
import DialogHeader from '../Dialog/dialog-header';
-import {PressableButton} from '../PressableButton';
-import {Toast} from '../Toast';
+import { PressableButton } from '../PressableButton';
+import { Toast } from '../Toast';
import Heading from '../Typography/Heading';
import Paragraph from '../Typography/Paragraph';
diff --git a/apps/mobile/src/components/RestoreDialog/index.js b/apps/mobile/src/components/RestoreDialog/index.js
index 21df10085..5ea9b2f90 100644
--- a/apps/mobile/src/components/RestoreDialog/index.js
+++ b/apps/mobile/src/components/RestoreDialog/index.js
@@ -206,6 +206,15 @@ const RestoreDataComponent = ({close, setRestoring, restoring}) => {
<ScrollView
nestedScrollEnabled
+ onScrollEndDrag={() => {
+ actionSheetRef.current?.childScrollHandler();
+ }}
+ onMomentumScrollEnd={() => {
+ actionSheetRef.current?.childScrollHandler();
+ }}
+ onScrollAnimationEnd={() => {
+ actionSheetRef.current?.childScrollHandler();
+ }}
style={{
paddingHorizontal: 12,
}}>