Author
|
zPlus <zplus@peers.community>
2022-08-10 04:39:37
|
Committer
|
zPlus <zplus@peers.community>
2022-08-10 04:39:37
|
Commit
|
2345b8d
(patch)
|
Tree
|
0e29332
|
Parent(s)
|
|
fix: Duplicated mail lists filters
Only show mailing-list filters once; avoid duplicate names.
commits diff:
aa65aa5..2345b8d
2 files changed,
4 insertions,
5 deletions
—
download
Diffstat
Diff options
+2/-2
M templates/mailing_list/emails.html
8
|
8
|
|
<summary>Filters</summary>
|
9
|
9
|
|
|
10
|
10
|
|
<form action="" method="get">
|
11
|
|
- |
{% for tag in tags %}
|
|
11
|
+ |
{% for tag in tags.keys()|sort %}
|
12
|
12
|
|
<div class="tag">
|
13
|
13
|
|
<b>{{ tag }}:</b>
|
14
|
|
- |
{% for value in tags[tag] %}
|
|
14
|
+ |
{% for value in tags[tag]|sort %}
|
15
|
15
|
|
<label><input type="checkbox" name="{{ tag }}" value="{{ value }}" {{ 'checked' if value in query_tags[tag] }} /> {{ value }}</label>
|
16
|
16
|
|
{% endfor %}
|
17
|
17
|
|
</div>
|
+2/-3
M web.py
777
|
777
|
|
|
778
|
778
|
|
thread_date, thread_time, thread_id, thread_title = obj.name.split(' ', 3)
|
779
|
779
|
|
|
780
|
|
- |
thread_tags = {}
|
781
|
780
|
|
try:
|
782
|
781
|
|
thread_tags = parse_thread_tags(obj['tags'].data.decode('UTF-8'))
|
783
|
782
|
|
|
784
|
783
|
|
# Collect tags for filters
|
785
|
784
|
|
for k, v in thread_tags.items():
|
786
|
|
- |
tags[k] = tags.get(k, []) + v
|
|
785
|
+ |
tags[k] = tags.get(k, set()).union(v)
|
787
|
786
|
|
except:
|
788
|
|
- |
pass
|
|
787
|
+ |
thread_tags = {}
|
789
|
788
|
|
|
790
|
789
|
|
# Check if we should filter out this thread from the list
|
791
|
790
|
|
keep = True
|