Skip to content

Commit

Permalink
Updated the way to get post live object
Browse files Browse the repository at this point in the history
  • Loading branch information
umareko committed Dec 20, 2023
1 parent 749de76 commit c51ba0a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/core/widget/post_live_object_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,11 @@ class PostLiveOjectWidget extends StatelessWidget {
this.disableAddComment = false})
: super(key: key);


@override
Widget build(BuildContext context) {
final themeData = Theme.of(context);
return StreamBuilder<AmityPost>(
stream: AmitySocialClient.newPostRepository()
.getPostLiveObject(amityPost.postId!),
stream: AmitySocialClient.newPostRepository().live.getPost(amityPost.postId!),
initialData: amityPost,
builder: (context, snapshot) {
if (snapshot.hasData) {
Expand Down Expand Up @@ -274,6 +272,5 @@ class PostLiveOjectWidget extends StatelessWidget {
return Container();
},
);

}
}
}

0 comments on commit c51ba0a

Please sign in to comment.