File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -167,7 +167,10 @@ sealed class Note implements Comparable<Note> {
167167 int get hashCode => id.hashCode;
168168
169169 @ignore
170- int get _idHash {
170+ int get _idHash => toIsarId (id);
171+
172+ /// Convert the [String] ID of the note to [int] ID used by isar.
173+ static int toIsarId (String id) {
171174 var hash = 0xcbf29ce484222325 ;
172175
173176 var i = 0 ;
Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ class NotesService {
165165 query: search,
166166 filter: searchFilter,
167167 );
168- final notesIds = searchResults.map ((Map <String , dynamic > noteIndex) => noteIndex['id' ] as int ).toList ();
168+ final notesIds = searchResults.map ((Map <String , dynamic > noteIndex) => Note . toIsarId ( noteIndex['id' ]) ).toList ();
169169
170170 final notes = (await getAllByIds (notesIds));
171171
You can’t perform that action at this time.
0 commit comments