♻️ Refactored attachment cache

This commit is contained in:
2024-11-18 00:55:39 +08:00
parent 432705c570
commit 359cd94532
16 changed files with 712 additions and 213 deletions

View File

@ -53,7 +53,8 @@ class _ExploreScreenState extends State<ExploreScreen> {
preload: SnPostPreload(
attachments: attachments
.where(
(ele) => out[i].body['attachments']?.contains(ele.rid) ?? false,
(ele) =>
out[i].body['attachments']?.contains(ele?.rid) ?? false,
)
.toList(),
),

View File

@ -80,7 +80,6 @@ class _PostEditorScreenState extends State<PostEditorScreen> {
_writeController.addAttachments(
result.map((e) => PostWriteMedia.fromFile(e)),
);
setState(() {});
}
@override