A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
fix actionSheet
ammarahm-edee3a8a1edc8e
diff --git a/apps/mobile/patches/react-native-actions-sheet+0.4.9.patch b/apps/mobile/patches/react-native-actions-sheet+0.4.9.patchindex 79d32d442..f13b3802d 100644--- a/apps/mobile/patches/react-native-actions-sheet+0.4.9.patch+++ b/apps/mobile/patches/react-native-actions-sheet+0.4.9.patch@@ -1,8 +1,105 @@diff --git a/node_modules/react-native-actions-sheet/src/index.js b/node_modules/react-native-actions-sheet/src/index.js-index dfa8fad..0fdd3d5 100644+index dfa8fad..0ada3ca 100644--- a/node_modules/react-native-actions-sheet/src/index.js+++ b/node_modules/react-native-actions-sheet/src/index.js-@@ -626,7 +626,7 @@ export default class ActionSheet extends Component {+@@ -72,7 +72,7 @@ export default class ActionSheet extends Component {+ */++ snapToOffset = (offset) => {+- let correction = this.state.deviceHeight * 0.1;++ let correction = this.state.deviceHeight * 0.15;+ let scrollOffset = this.props.gestureEnabled+ ? offset + correction + this.props.extraScroll+ : offset + correction + this.props.extraScroll;+@@ -188,7 +188,7 @@ export default class ActionSheet extends Component {+ resolve(height === 0 ? 20 : height);+ }+ );+- }, 50);++ }, 100);+ });+ };++@@ -196,7 +196,6 @@ export default class ActionSheet extends Component {+ let { gestureEnabled, delayActionSheetDraw, delayActionSheetDrawTime } =+ this.props;+ if (!event?.nativeEvent) return;+-+ let height = event.nativeEvent.layout.height;++ if (this.layoutHasCalled) {+@@ -277,7 +276,7 @@ export default class ActionSheet extends Component {+ let { springOffset, extraScroll } = this.props;+ let verticalOffset = event.nativeEvent.contentOffset.y;++- let correction = this.state.deviceHeight * 0.1;++ let correction = this.state.deviceHeight * 0.15;+ if (this.isRecoiling) return;++ if (this.prevScroll < verticalOffset) {+@@ -330,7 +329,7 @@ export default class ActionSheet extends Component {+ }++ _returnToPrevScrollPosition(height) {+- let correction = this.state.deviceHeight * 0.1;++ let correction = this.state.deviceHeight * 0.15;+ let scrollOffset =+ height * this.currentOffsetFromBottom ++ correction ++@@ -380,7 +379,7 @@ export default class ActionSheet extends Component {+ this.targetId = event.nativeEvent.target;+ this.offsetY = event.nativeEvent.contentOffset.y;++- let correction = this.state.deviceHeight * 0.1;++ let correction = this.state.deviceHeight * 0.15;+ let distanceFromTop = this.actionSheetHeight + correction - this.offsetY;++ if (distanceFromTop < 3) {+@@ -396,15 +395,6 @@ export default class ActionSheet extends Component {+ }+ if (this.actionSheetHeight >= this.state.deviceHeight) {+ if (!this.props.drawUnderStatusBar) return;+- /* if (+- distanceFromTop < StatusBar.currentHeight &&+- Platform.OS === "android" &&+- this.props.statusBarTranslucent+- ) {+- this.indicatorTranslateY.setValue(+- StatusBar.currentHeight - distanceFromTop+- );+- } */+ if (distanceFromTop < this.state.paddingTop) {+ this.indicatorTranslateY.setValue(+ -this.state.paddingTop + (this.state.paddingTop - distanceFromTop)+@@ -541,7 +531,7 @@ export default class ActionSheet extends Component {+ let event = { ..._event };++ let safeMarginFromTop = 0;+- if (!this.props.drawUnderStatusBar) {++ if (this.props.drawUnderStatusBar) {+ if (Platform.OS === "android" && !this.props.statusBarTranslucent) return;+ safeMarginFromTop =+ Platform.OS === "ios" ? await this.measure() : StatusBar.currentHeight;+@@ -562,16 +552,13 @@ export default class ActionSheet extends Component {+ deviceHeight: height,+ deviceWidth: width,+ portrait: height > width,+- paddingTop:+- Platform.OS === "android"+- ? StatusBar.currentHeight+- : await this.measure(),++ paddingTop:safeMarginFromTop,+ });+ };++ getInitialScrollPosition() {+ this._applyHeightLimiter();+- let correction = this.state.deviceHeight * 0.1;++ let correction = this.state.deviceHeight * 0.15;+ let scrollPosition = this.props.gestureEnabled+ ? this.actionSheetHeight * this.props.initialOffsetFromBottom ++ correction ++@@ -626,7 +613,7 @@ export default class ActionSheet extends Component {<SafeAreaView ref={this.safeAreaViewRef} style={styles.safearea}><View /></SafeAreaView>