fix #1400: auto-apply tag when creating new entry in tag view

This commit is contained in:
antelle 2020-04-23 18:20:46 +02:00
parent d45748cc32
commit 8d2640d99d
No known key found for this signature in database
GPG Key ID: 094A2F2D6136A4EE
3 changed files with 9 additions and 3 deletions

View File

@ -407,7 +407,9 @@ class AppModel {
newEntry.copyFromTemplate(templateEntry);
return newEntry;
} else {
return EntryModel.newEntry(sel.group, sel.file);
return EntryModel.newEntry(sel.group, sel.file, {
tag: this.filter.tag
});
}
}

View File

@ -792,12 +792,15 @@ class EntryModel extends Model {
return model;
}
static newEntry(group, file) {
static newEntry(group, file, opts) {
const model = new EntryModel();
const entry = file.db.createEntry(group.group);
if (AppSettingsModel.useGroupIconForEntries && group.icon && group.iconId) {
entry.icon = group.iconId;
}
if (opts && opts.tag) {
entry.tags = [opts.tag];
}
model.setEntry(entry, group, file);
model.entry.times.update();
model.unsaved = true;

View File

@ -1,7 +1,8 @@
Release notes
-------------
##### v1.15.0 (WIP)
`+` #557: Argon2 speed improvements in desktop apps
`+` #557: Argon2 speed improvements in desktop apps
`+` #1400: auto-apply tag when creating new entry in tag view
##### v1.14.0 (2020-04-18)
`+` using OAuth authorization code grant for all storage providers