🐛 Fix attachment loading

This commit is contained in:
2024-11-13 00:25:02 +08:00
parent 468d1377af
commit b9ad6d4fd0
4 changed files with 39 additions and 4 deletions

View File

@ -49,9 +49,10 @@ class SnAttachmentProvider {
.map((e) => SnAttachment.fromJson(e))
.toList();
for (var i = 0; i < out.length; i++) {
_cache[pendingFetch[i]] = out[i];
for (final item in out) {
_cache[item.rid] = item;
}
return rids
.where((rid) => _cache.containsKey(rid))
.map((rid) => _cache[rid]!)