fix sort field check on save

This commit is contained in:
Damien Elmes 2020-05-04 21:30:18 +10:00
parent 5ff83fad08
commit 996d408695

View file

@ -58,7 +58,7 @@ impl Collection {
) -> Result<()> { ) -> Result<()> {
let ords: Vec<_> = nt.fields.iter().map(|f| f.ord).collect(); let ords: Vec<_> = nt.fields.iter().map(|f| f.ord).collect();
if !ords_changed(&ords, previous_field_count) { if !ords_changed(&ords, previous_field_count) {
if nt.config.sort_field_idx == previous_sort_idx { if nt.config.sort_field_idx != previous_sort_idx {
// only need to update sort field // only need to update sort field
let nids = self.search_notes_only(&format!("mid:{}", nt.id))?; let nids = self.search_notes_only(&format!("mid:{}", nt.id))?;
for nid in nids { for nid in nids {