Skip to content

Commit

Permalink
Merge pull request #7 from Kara-Zor-El/hideCollectionsWhenScrolling
Browse files Browse the repository at this point in the history
Changed way home screen works to be more seamless
  • Loading branch information
Kara-Zor-El authored Dec 9, 2022
2 parents 304946a + dd080f5 commit 5bb46f2
Show file tree
Hide file tree
Showing 2 changed files with 257 additions and 260 deletions.
8 changes: 5 additions & 3 deletions lib/providers/fetchCategories.dart
Original file line number Diff line number Diff line change
Expand Up @@ -167,19 +167,21 @@ Future<void> removeEntriesFromDatabase(
for (var i = 0; i < comicsArray.length; i++) {
List<Map<String, dynamic>> comics = await comicsArray[i];
for (var j = 0; j < comics.length; j++) {
serverIds.add(comics[j]['Id']);
serverIds.add(comics[j]['id']);
}
}

for (var i = 0; i < entryIds.length; i++) {
if (!serverIds.contains(entryIds[i])) {
entriesToRemove.add(entryIds[i] as int);
int isarId = await isar.entrys.where().idEqualTo(entryIds[i]).findAll().then((value) => value[0].isarId);
entriesToRemove.add(isarId);
}
}

for (var i = 0; i < folderIds.length; i++) {
if (!serverIds.contains(folderIds[i])) {
foldersToRemove.add(folderIds[i] as int);
int isarId = await isar.folders.where().findAll().then((value) => value[i].isarId);
foldersToRemove.add(isarId);
}
}

Expand Down
Loading

0 comments on commit 5bb46f2

Please sign in to comment.