mirror of https://gitlab.com/bashrc2/epicyon
Check for duplicates in previewed posts on profile screen
parent
26719fc2df
commit
303e0ae25b
|
@ -1197,7 +1197,10 @@ def _html_profile_posts(recent_posts_cache: {}, max_recent_posts: int,
|
||||||
break
|
break
|
||||||
if len(outbox_feed['orderedItems']) == 0:
|
if len(outbox_feed['orderedItems']) == 0:
|
||||||
break
|
break
|
||||||
|
shown_items = []
|
||||||
for item in outbox_feed['orderedItems']:
|
for item in outbox_feed['orderedItems']:
|
||||||
|
if not item.get('id'):
|
||||||
|
continue
|
||||||
if item['type'] == 'Create':
|
if item['type'] == 'Create':
|
||||||
post_str = \
|
post_str = \
|
||||||
individual_post_as_html(signing_priv_key_pem,
|
individual_post_as_html(signing_priv_key_pem,
|
||||||
|
@ -1224,8 +1227,9 @@ def _html_profile_posts(recent_posts_cache: {}, max_recent_posts: int,
|
||||||
timezone, False,
|
timezone, False,
|
||||||
bold_reading, dogwhistles,
|
bold_reading, dogwhistles,
|
||||||
minimize_all_images)
|
minimize_all_images)
|
||||||
if post_str:
|
if post_str and item['id'] not in shown_items:
|
||||||
profile_str += post_str + separator_str
|
profile_str += post_str + separator_str
|
||||||
|
shown_items.append(item['id'])
|
||||||
ctr += 1
|
ctr += 1
|
||||||
if ctr >= max_items:
|
if ctr >= max_items:
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in New Issue