Comments (12)
Which OS has this issue? I run joplin on Arch Linux and it is working instantly for me.
from joplin.
All of them probably
from joplin.
The only probable reason I could find is that the await Note.save(...)
holds the event emit (at /packages/app-desktop/gui/NoteList/NoteList.tsx
). The emit could be initiated before the save function, because the latter can take up some time for larger notes.
const noteItem_checkboxClick = async (event: any, item: any) => {
const checked = event.target.checked;
const newNote = {
id: item.id,
todo_completed: checked ? time.unixMs() : 0,
};
await Note.save(newNote, { userSideValidation: true });
eventManager.emit(EventName.TodoToggle, { noteId: item.id, note: newNote });
};
from joplin.
@DarkFalc0n - so just interchanging the two lines should fix it?
from joplin.
Interchanging could lead to other cases of bad error handling where there is an exception and the note state couldn't be saved but the check will still update. The current order of functions makes more sense since any error in saving the note can be reflected even before updating the list (and the check mark)
from joplin.
It needs more thought to be put into it
from joplin.
@DarkFalc0n, I think you could interchange them & add e.g. try, catch
block:
eventManager.emit(EventName.TodoToggle, { noteId: item.id, note: newNote });
try {
await Note.save(newNote, { userSideValidation: true });
} catch(e) {
eventManager.emit(EventName.TodoToggle, { noteId: item.id, note: newNote });
}
Maybe re-throw the error if needed.
from joplin.
This could definitely work, lets see what others think of this
from joplin.
Actually, I'm not sure if this particular NoteList.tsx
component is being used, I think the one that's being used is NoteList2.tsx
.
from joplin.
That's right, we'll need to remove NoteList.tsx. I kept it there for some time just in case there's a major issue with the new note list
from joplin.
There's a similar logic in NoteList2.tsx
anyway 👀
joplin/packages/app-desktop/gui/NoteListItem/NoteListItem.tsx
Lines 53 to 59 in 06aa640
But I'm not sure if it's really what's causing this behaviour, I added few hindered to-dos and it feels the same regardless of commenting the await
or not.
from joplin.
I've been playing around this by adding:
await new Promise(resolve => setTimeout(resolve, 2000));
before Note.save()
and props.dispatch()
, you can see the behavior in this gif:
I think the solution I suggested above can't be applied here, props.dispatch()
depends on the Note.save()
.
from joplin.
Related Issues (20)
- v3.0.2 bug report HOT 5
- AppImage: Spell Check does not find mistakes HOT 1
- Images from behind a login cannot be pasted in RTE
- Beta editor: Option + Up / Down does not swap lines HOT 1
- Beta editor add two newlines instead of one in certain contexts HOT 2
- Cannot create a new note or to-do after Joplin shutdown with All Notes or a tag selected in the sidebar HOT 4
- Menu bar undo and redo options doesn't work when new line is inserted. HOT 3
- BibTex plugin shows an error on starting the desktop application HOT 1
- Issue in Menu Nav Bar HOT 1
- Desktop: Dev branch not working with node 16 HOT 3
- Entering first character into a note, switches notes. HOT 3
- Focus on title field after creating new note or todo HOT 1
- Exporting only part of keyboard shortcut list HOT 1
- Vim cursor disappears when toggling editor layout HOT 3
- Mobile: Possible memory leak in `FsDriver.readFileChunk` (affects plugin loading) HOT 2
- Mobile: Add a way to ignore sync issues related to a specific attachment HOT 1
- Sort notes utility is visible even without any notes in a notebook.
- Input fields all over the application are disabled after showing message dialog HOT 5
- Notebook selection blocked in note editor
- Accessibility: Screen reader focus stays on the open menu button when the note actions menu is opened
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from joplin.