mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-27 10:32:58 +02:00
Electron: Fixed auto-title when title is manually entered first
This commit is contained in:
parent
a4106436c4
commit
5b6019805c
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user