You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-08-13 22:12:50 +02:00
Electron: Fixed auto-title when title is manually entered first
This commit is contained in:
@@ -48,5 +48,4 @@ script:
|
||||
- |
|
||||
cd ElectronClient/app
|
||||
rsync -aP --delete ../../ReactNativeClient/lib/ lib/
|
||||
npm install
|
||||
yarn dist
|
||||
npm install && yarn dist
|
||||
|
@@ -30,6 +30,7 @@ shared.saveNoteButton_press = async function(comp) {
|
||||
options.fields = BaseModel.diffObjectsFields(comp.state.lastSavedNote, note);
|
||||
}
|
||||
|
||||
|
||||
const hasAutoTitle = comp.state.newAndNoTitleChangeNoteId || (isNew && !note.title);
|
||||
if (hasAutoTitle) {
|
||||
note.title = Note.defaultTitle(note);
|
||||
@@ -63,7 +64,7 @@ shared.saveNoteButton_press = async function(comp) {
|
||||
note: note,
|
||||
};
|
||||
|
||||
if (isNew) newState.newAndNoTitleChangeNoteId = note.id;
|
||||
if (isNew && hasAutoTitle) newState.newAndNoTitleChangeNoteId = note.id;
|
||||
|
||||
comp.setState(newState);
|
||||
|
||||
|
Reference in New Issue
Block a user