Skip to content

Conversation

@korelstar
Copy link
Member

@korelstar korelstar commented Jun 27, 2020

For new notes, the title is automatically changed. This PR debounces the title generation from saving the content. Therefore, a timer is set that generates a new title after 5 seconds 2 seconds after the last typing in that note.

fixes #489

@korelstar korelstar added the feature: editor Related to generic parts of the editor, e.g. loading/saving notes label Jun 27, 2020
@korelstar korelstar added this to the 3.6.0 milestone Jun 27, 2020
@stefan-niedermann
Copy link
Member

5 seconds is a little bit long, no? I think 1 second is by far enough?

@stefan-niedermann
Copy link
Member

Ah, i see, it's because of the activities issue...

Still i never created a new note which took longer than 5 seconds^^

@korelstar
Copy link
Member Author

I would not make this timeout lower than the auto save interval. Auto save interval is currently 2 seconds, but auto save will be executed also during typing - while auto title is only executed if you pause typing.

We could set auto save interval to 1 second and auto title interval to 2 seconds. That would still improve the situation of #489, I think.

What do you think of this?

/cc @violoncelloCH

@stefan-niedermann
Copy link
Member

Good enough for me 👍

@korelstar korelstar merged commit be0666f into master Jun 28, 2020
@korelstar korelstar deleted the autotitle branch June 28, 2020 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: editor Related to generic parts of the editor, e.g. loading/saving notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

typing in the first line of a notes generates 2 activity entries for (almost) each character

3 participants