Пример #1
0
 def search_note(self, query, notebook_id):
     note_ids = self.note_searcher.search(query, notebook_id)
     notes = Note.find_by_ids(note_ids) if note_ids else []
     self.list_panel.add_notes(notes, is_from_search=True)
     self._display_note_list(notes)
Пример #2
0
 def sort_note(self, sort_field, sort_dir):
     note_ids = self.list_panel.note_ids
     notes = Note.find_by_ids(note_ids,
                              order_field=sort_field,
                              order_dir=sort_dir)
     self.list_panel.sort_notes(notes)