Skip to content

Commit

Permalink
Merge pull request #754 from squidowl/fix/infinite_scroll-default
Browse files Browse the repository at this point in the history
Default Value for `infinite_scroll`
  • Loading branch information
tarkah authored Feb 5, 2025
2 parents 011b136 + 821eca2 commit 97b41cc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Unreleased

Fixed:

- [`infinite_scroll`](https://halloy.squidowl.org/configuration/buffer.html?highlight=infinite#infinite_scroll) was defaulting to `false`, contrary to its documented default value. Now defaults to `true`.

# 2025.1 (2025-02-02)

Added:
Expand Down
12 changes: 10 additions & 2 deletions data/src/config/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,20 @@ impl Default for InternalMessage {
}
}

#[derive(Debug, Clone, Default, Deserialize)]
#[derive(Debug, Clone, Deserialize)]
pub struct ChatHistory {
#[serde(default)]
#[serde(default = "default_bool_true")]
pub infinite_scroll: bool,
}

impl Default for ChatHistory {
fn default() -> Self {
Self {
infinite_scroll: true,
}
}
}

#[derive(Debug, Copy, Clone, Default, Deserialize)]
#[serde(rename_all = "kebab-case")]
pub enum UsernameFormat {
Expand Down

0 comments on commit 97b41cc

Please sign in to comment.