diff options
author | Soispha <soispha@vhack.eu> | 2024-01-28 21:24:18 +0100 |
---|---|---|
committer | Soispha <soispha@vhack.eu> | 2024-01-28 21:24:18 +0100 |
commit | 5e561776b46971b83b5c640aa15e01e141548dad (patch) | |
tree | 1baa5155735328dffc87fe414839b01c3101f5f6 | |
parent | fix(sys/nixpkgs/pkgs/comments): Wrap with correct `fmt` (diff) | |
download | nixos-config-5e561776b46971b83b5c640aa15e01e141548dad.tar.gz nixos-config-5e561776b46971b83b5c640aa15e01e141548dad.zip |
fix(sys/nixpkgs/pkgs/comments): Append comments to the back of replies
This should fix an issue where the comment is appended to the wrong reply chain, when one person has commented twice. This builds on the assumption that comments are sorted by timestamp (which they are in this case).
-rw-r--r-- | sys/nixpkgs/pkgs/comments/src/main.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/nixpkgs/pkgs/comments/src/main.rs b/sys/nixpkgs/pkgs/comments/src/main.rs index de98d75e..05f0e8cd 100644 --- a/sys/nixpkgs/pkgs/comments/src/main.rs +++ b/sys/nixpkgs/pkgs/comments/src/main.rs @@ -227,7 +227,7 @@ fn main() -> anyhow::Result<()> { if let Some(parent) = output_replies .iter_mut() - .rev() + // .rev() .flat_map(|com| &mut com.replies) .flat_map(|com| &mut com.replies) .flat_map(|com| &mut com.replies) @@ -240,7 +240,7 @@ fn main() -> anyhow::Result<()> { })) } else if let Some(parent) = output_replies .iter_mut() - .rev() + // .rev() .flat_map(|com| &mut com.replies) .flat_map(|com| &mut com.replies) .filter(|com| com.value.author == replyee) @@ -252,7 +252,7 @@ fn main() -> anyhow::Result<()> { })) } else if let Some(parent) = output_replies .iter_mut() - .rev() + // .rev() .flat_map(|com| &mut com.replies) .filter(|com| com.value.author == replyee) .last() @@ -262,7 +262,7 @@ fn main() -> anyhow::Result<()> { ..reply.value })) } else if let Some(parent) = output_replies.iter_mut() - .rev() + // .rev() .filter(|com| com.value.author == replyee) .last() { |