From f1e8a0a42f9b0d2b11201a2b67bea6f60e37c76f Mon Sep 17 00:00:00 2001 From: Rahix Date: Tue, 12 May 2020 18:41:33 +0200 Subject: collapse_posts: Add a collapse_depth attribute Replace the hardcoded depth of 3 with a class attribute that can later be set from a commandline argument. --- src/filters.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/filters.cc') diff --git a/src/filters.cc b/src/filters.cc index 6b91aab4..3e481139 100644 --- a/src/filters.cc +++ b/src/filters.cc @@ -472,12 +472,10 @@ void collapse_posts::report_subtotal() value_t& collapse_posts::find_totals(account_t* account) { - unsigned short depth=3; - - if (depth == 0) + if (collapse_depth == 0) return totals[_("")]; - if (account->depth == depth) + if (account->depth == collapse_depth) return totals[account->fullname()]; //else recurse -- cgit v1.2.3