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 correct alias not showing
ammarahm-ed1828f6f81a28
diff --git a/apps/mobile/src/components/ActionSheetComponent/index.js b/apps/mobile/src/components/ActionSheetComponent/index.jsindex 8b06490ee..21e518ecf 100644--- a/apps/mobile/src/components/ActionSheetComponent/index.js+++ b/apps/mobile/src/components/ActionSheetComponent/index.js@@ -81,6 +81,8 @@ export const ActionSheetComponent = ({const lastSynced = useUserStore(state => state.lastSynced);const [notifPinned, setNotifPinned] = useState(null);const dimensions = useSettingStore(state => state.dimensions);+ const alias = note.type === "tag" ? db.tags.alias(note.id) : note.type === "color" ? db.colors.alias(note.id) : note.title+const refreshing = false;const isPublished = db.monographs.isPublished(note.id);@@ -107,6 +109,7 @@ export const ActionSheetComponent = ({setNotifPinned(null);return;}+let index = pinned.findIndex(notif => notif.tag === item.id);if (index !== -1) {setNotifPinned(pinned[index]);@@ -475,15 +478,15 @@ export const ActionSheetComponent = ({id: notesnook.ids.dialogs.actionsheet.pinMenu},{- name: 'Edit Tag',- title: 'Edit tag',+ name: 'Rename Tag',+ title: 'Rename tag',icon: 'square-edit-outline',func: async () => {close();await sleep(300);presentDialog({- title: 'Edit tag',- paragraph: 'Change the title of the tag',+ title: 'Rename tag',+ paragraph: 'Change the title of the tag ' + alias,positivePress: async value => {await db.tags.rename(note.id, value);Navigation.setRoutesToUpdate([@@ -493,8 +496,8 @@ export const ActionSheetComponent = ({]);},input: true,- defaultValue: note.title,- inputPlaceholder: 'Enter tag title',+ defaultValue: alias,+ inputPlaceholder: 'Enter title of tag',positiveText: 'Save'});}@@ -725,7 +728,7 @@ export const ActionSheetComponent = ({}}size={SIZE.md}>{note.type === 'tag' ? '#' : null}- {note?.title.replace('\n', '')}+ {alias}</Heading>{note.headline || note.description ? (diff --git a/apps/mobile/src/components/TagItem/index.js b/apps/mobile/src/components/TagItem/index.jsindex 601317a98..ca622404f 100644--- a/apps/mobile/src/components/TagItem/index.js+++ b/apps/mobile/src/components/TagItem/index.js@@ -4,6 +4,7 @@ import {notesnook} from '../../../e2e/test.ids';import {PressableButton} from '../../components/PressableButton';import {useTracked} from '../../provider';import Navigation from '../../services/Navigation';+import { db } from '../../utils/DB';import {SIZE} from '../../utils/SizeUtils';import {ActionIcon} from '../ActionIcon';import {ActionSheetEvent} from '../DialogManager/recievers';@@ -59,7 +60,7 @@ const TagItem = ({item, index}) => {}}>#</Heading>- {item.title}+ {db.tags.alias(item.id)}</Heading><Paragraphcolor={colors.icon}@@ -80,7 +81,7 @@ const TagItem = ({item, index}) => {name="dots-horizontal"size={SIZE.xl}onPress={() => {- let rowItems = ['Add Shortcut', 'Delete', 'Edit Tag'];+ let rowItems = ['Add Shortcut', 'Delete', 'Rename Tag'];ActionSheetEvent(item, false, false, rowItems);}}testID={notesnook.ids.tag.menu}