Skip to content

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

mobile: minor fixes

Ammar Ahmed4ee82b4fd6ee
diff --git a/apps/mobile/app/components/sheets/restore-data/index.js b/apps/mobile/app/components/sheets/restore-data/index.js
index 55b7555df..529f9fbc7 100644
--- a/apps/mobile/app/components/sheets/restore-data/index.js
+++ b/apps/mobile/app/components/sheets/restore-data/index.js
@@ -47,6 +47,7 @@ import { Button } from "../../ui/button";
import Seperator from "../../ui/seperator";
import SheetWrapper from "../../ui/sheet";
import Paragraph from "../../ui/typography/paragraph";
+import Navigation from "../../../services/navigation";
const RestoreDataSheet = () => {
const [visible, setVisible] = useState(false);
@@ -242,6 +243,7 @@ const RestoreDataComponent = ({ close, setRestoring, restoring }) => {
const restoreBackup = async (backup, password, key) => {
await db.backup.import(backup, password, key);
+
await db.initCollections();
initialize();
ToastManager.show({
@@ -249,10 +251,12 @@ const RestoreDataComponent = ({ close, setRestoring, restoring }) => {
type: "success",
context: "global"
});
+ Navigation.queueRoutesForUpdate();
return true;
};
const backupError = (e) => {
+ console.log(e.stack);
ToastManager.show({
heading: "Restore failed",
message:
@@ -314,7 +318,7 @@ const RestoreDataComponent = ({ close, setRestoring, restoring }) => {
}
await db.initCollections();
- initialize();
+ Navigation.queueRoutesForUpdate();
setRestoring(false);
close();
ToastManager.show({
diff --git a/apps/mobile/app/components/side-menu/color-section.tsx b/apps/mobile/app/components/side-menu/color-section.tsx
index 6e1cdd1a7..7ff280c18 100644
--- a/apps/mobile/app/components/side-menu/color-section.tsx
+++ b/apps/mobile/app/components/side-menu/color-section.tsx
@@ -28,12 +28,11 @@ import { useMenuStore } from "../../stores/use-menu-store";
import useNavigationStore from "../../stores/use-navigation-store";
import { useSettingStore } from "../../stores/use-setting-store";
import { SIZE, normalize } from "../../utils/size";
-import { presentDialog } from "../dialog/functions";
+import ReorderableList from "../list/reorderable-list";
+import { Properties } from "../properties";
import { PressableButton } from "../ui/pressable";
import Heading from "../ui/typography/heading";
import Paragraph from "../ui/typography/paragraph";
-import ReorderableList from "../list/reorderable-list";
-import { Properties } from "../properties";
export const ColorSection = React.memo(
function ColorSection() {
@@ -142,11 +141,11 @@ const ColorItem = React.memo(
</View>
{isFocused ? (
<Heading color={colors.selected.heading} size={SIZE.md}>
- {item.title?.slice(0, 1).toUpperCase() + item.title.slice(1)}
+ {item.title}
</Heading>
) : (
<Paragraph color={colors.primary.paragraph} size={SIZE.md}>
- {item.title?.slice(0, 1).toUpperCase() + item.title.slice(1)}
+ {item.title}
</Paragraph>
)}
</View>