]> Untitled Git - lemmy.git/blobdiff - crates/api_crud/src/comment/list.rs
Showing # of unread comments for posts. Fixes #2134 (#2393)
[lemmy.git] / crates / api_crud / src / comment / list.rs
index e7632cba2dd1fe441b5836862de9f923c929ca00..e8ff8c1800cf01cca1a8b13a7de39fb601ad7da8 100644 (file)
@@ -63,6 +63,7 @@ impl PerformCrud for GetComments {
       None
     };
 
+    let parent_path_cloned = parent_path.to_owned();
     let post_id = data.post_id;
     let local_user = local_user_view.map(|l| l.local_user);
     let mut comments = blocking(context.pool(), move |conn| {
@@ -74,7 +75,7 @@ impl PerformCrud for GetComments {
         .saved_only(saved_only)
         .community_id(community_id)
         .community_actor_id(community_actor_id)
-        .parent_path(parent_path)
+        .parent_path(parent_path_cloned)
         .post_id(post_id)
         .local_user(local_user.as_ref())
         .page(page)