Skip to content

Commit a3a0eac

Browse files
committed
fix microlag
1 parent 967bac6 commit a3a0eac

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/pages/article/components/post_store.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ class PostStorage with ChangeNotifier {
2929
loadingState = LoadingState.inProgress;
3030
storage
3131
.article(_id)
32-
.mapRight(
33-
(right) => ParsedPost(
32+
.mapRightAsync(
33+
(right) async => ParsedPost(
3434
id: right.id,
3535
title: right.title,
3636
author: right.author,
3737
publishDate: right.publishDate,
38-
parsedBody: htmlAsParsedJson(right.body),
38+
parsedBody: await compute(htmlAsParsedJson, right.body),
3939
),
4040
)
4141
.either((left) {

0 commit comments

Comments
 (0)