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

fix: validate name when renaming in editor #1213

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

Conversation

ZebraVogel94349
Copy link
Contributor

I've noticed that validation of the new name when renaming a note in the editor doesn't work, so you can rename a note to an empty name or a name containing slashes from the editor. The problem was that _filenameFormKey.currentState?.validate() ?? true is always a string or true, but it should be false if the function returns null. I've also fixed a bug which made it impossible to save a note after renaming it in the editor but before the new name has been applied.

Copy link

codecov bot commented Apr 7, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 36.97%. Comparing base (f3afcea) to head (a2a29c5).

Files Patch % Lines
lib/pages/editor/editor.dart 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1213      +/-   ##
==========================================
+ Coverage   36.93%   36.97%   +0.04%     
==========================================
  Files         111      111              
  Lines        8715     8716       +1     
==========================================
+ Hits         3219     3223       +4     
+ Misses       5496     5493       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant