mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-24 07:29:30 +01:00
mobile: minor fixes
This commit is contained in:
committed by
Abdullah Atta
parent
d0f0c32ffa
commit
4ee82b4fd6
@@ -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({
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user