Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[enhancement] Save storage folder choice if notes are loaded successfully #85

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

tuancoltech
Copy link
Collaborator

@tuancoltech tuancoltech commented Dec 2, 2024

Description

Save storage folder choice if notes are loaded successfully

Current flow:
Ask the user what folder to use
Saves the provided path
Load the folder
If it crashes, the path is already recorded
Next launch is guaranteed to crash

Better flow:
Ask the user what folder to use
Load the folder
If it loads ok, save the path
If it crashes, nothing is saved, so user can choose different folder next time

This PR also improves the current logic where root and propertiesStorage were created (and initialized) thrice for different note repositories (Text/Voice/Graphics).
root and propertiesStorage should in fact be singleton design, which is a single object and independent of note type repositories.

Ticket

https://app.asana.com/0/1207829522063916/1208764213190532

@tuancoltech tuancoltech self-assigned this Dec 2, 2024
@tuancoltech tuancoltech changed the base branch from main to bug/crash_startup December 2, 2024 07:00
@tuancoltech tuancoltech force-pushed the feat/path_selection_improvement branch from 894c8f4 to a770873 Compare December 2, 2024 08:31
@tuancoltech tuancoltech changed the title WIP: [enhancement] Save storage folder choice if notes are loaded successfully [enhancement] Save storage folder choice if notes are loaded successfully Dec 2, 2024
@tuancoltech tuancoltech added the enhancement New feature or request label Dec 2, 2024
@tuancoltech tuancoltech force-pushed the feat/path_selection_improvement branch from e09da72 to 28ba38d Compare December 15, 2024 13:54
@tuancoltech
Copy link
Collaborator Author

@shubertm @hieuwu Could you please help review this one?

@tuancoltech tuancoltech changed the base branch from bug/crash_startup to main December 17, 2024 13:01
…tore it once load is successfully

* Remove redundant initializations of NotesRepoHelper across different note type repositories
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant