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
mobile: fix attachment dialog ui
ammarahm-ed0b06d2a4bd5c
diff --git a/apps/mobile/app/components/attachments/attachment-item.js b/apps/mobile/app/components/attachments/attachment-item.jsindex ea883d5bc..8a5a12de5 100644--- a/apps/mobile/app/components/attachments/attachment-item.js+++ b/apps/mobile/app/components/attachments/attachment-item.js@@ -46,7 +46,6 @@ export const AttachmentItem = ({ attachment, encryption, setAttachments }) => {const encryptionProgress = useAttachmentStore((state) => state.encryptionProgress);-const onPress = () => {Actions.present(attachment, setAttachments, attachment.metadata.hash);};@@ -122,7 +121,9 @@ export const AttachmentItem = ({ attachment, encryption, setAttachments }) => {</View></View>- {currentProgress || encryptionProgress || encryption ? (+ {currentProgress ||+ (encryptionProgress && encryptionProgress !== "0.00") ||+ encryption ? (<TouchableOpacityactiveOpacity={0.9}onPress={() => {diff --git a/apps/mobile/app/components/attachments/index.js b/apps/mobile/app/components/attachments/index.jsindex 877e1c7f0..a640f19d9 100644--- a/apps/mobile/app/components/attachments/index.js+++ b/apps/mobile/app/components/attachments/index.js@@ -19,7 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import React, { useRef, useState } from "react";import { View } from "react-native";-import { FlatList } from "react-native-gesture-handler";import Icon from "react-native-vector-icons/MaterialCommunityIcons";import { db } from "../../common/database";import filesystem from "../../common/filesystem";@@ -31,11 +30,11 @@ import Input from "../ui/input";import Seperator from "../ui/seperator";import Paragraph from "../ui/typography/paragraph";import { AttachmentItem } from "./attachment-item";+import { FlatList } from "react-native-actions-sheet";export const AttachmentDialog = ({ data }) => {const colors = useThemeStore((state) => state.colors);const [note, setNote] = useState(data);- const actionSheetRef = useRef();const [attachments, setAttachments] = useState(data? db.attachments.ofNote(data.id, "all")@@ -115,14 +114,8 @@ export const AttachmentDialog = ({ data }) => {) : null}<FlatList- nestedScrollEnabled- overScrollMode="never"- scrollToOverflowEnabled={false}keyboardDismissMode="none"keyboardShouldPersistTaps="always"- onMomentumScrollEnd={() => {- actionSheetRef.current?.handleChildScrollEnd();- }}ListEmptyComponent={<Viewstyle={{diff --git a/apps/mobile/app/screens/settings/settings-data.tsx b/apps/mobile/app/screens/settings/settings-data.tsxindex 31bd30887..10186809f 100644--- a/apps/mobile/app/screens/settings/settings-data.tsx+++ b/apps/mobile/app/screens/settings/settings-data.tsx@@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/+import notifee from "@notifee/react-native";import dayjs from "dayjs";import React from "react";import { Linking, Platform } from "react-native";@@ -25,6 +26,7 @@ import * as RNIap from "react-native-iap";import { enabled } from "react-native-privacy-snapshot";import { db } from "../../common/database";import { MMKV } from "../../common/database/mmkv";+import { AttachmentDialog } from "../../components/attachments";import { ChangePassword } from "../../components/auth/change-password";import { presentDialog } from "../../components/dialog/functions";import { ChangeEmail } from "../../components/sheets/change-email";@@ -56,7 +58,6 @@ import { SUBSCRIPTION_STATUS } from "../../utils/constants";import {eCloseSheet,eCloseSimpleDialog,- eOpenAttachmentsDialog,eOpenLoginDialog,eOpenRecoveryKeyDialog,eOpenRestoreDialog@@ -68,7 +69,6 @@ import { useDragState } from "./editor/state";import { verifyUser } from "./functions";import { SettingSection } from "./types";import { getTimeLeft } from "./user-section";-import notifee from "@notifee/react-native";type User = any;@@ -149,7 +149,7 @@ export const settingsGroups: SettingSection[] = [name: "Manage attachments",icon: "attachment",modifer: () => {- eSendEvent(eOpenAttachmentsDialog);+ AttachmentDialog.present();},description: "Manage all attachments in one place."},