mirror of https://gitlab.com/bashrc2/epicyon
Show mutual icon on Liked By screen
parent
0f74d862f0
commit
256e7a1d85
|
|
@ -4562,7 +4562,8 @@ def daemon_http_get(self) -> None:
|
|||
self.server.i2p_domain,
|
||||
self.server.bold_reading,
|
||||
self.server.mitm_servers,
|
||||
self.server.instance_software):
|
||||
self.server.instance_software,
|
||||
ua_str):
|
||||
self.server.getreq_busy = False
|
||||
return
|
||||
|
||||
|
|
@ -4854,7 +4855,8 @@ def daemon_http_get(self) -> None:
|
|||
self.server.i2p_domain,
|
||||
self.server.bold_reading,
|
||||
self.server.mitm_servers,
|
||||
self.server.instance_software):
|
||||
self.server.instance_software,
|
||||
ua_str):
|
||||
self.server.getreq_busy = False
|
||||
return
|
||||
|
||||
|
|
@ -4900,7 +4902,8 @@ def daemon_http_get(self) -> None:
|
|||
self.server.onion_domain,
|
||||
self.server.i2p_domain,
|
||||
self.server.mitm_servers,
|
||||
self.server.instance_software):
|
||||
self.server.instance_software,
|
||||
ua_str):
|
||||
self.server.getreq_busy = False
|
||||
return
|
||||
|
||||
|
|
|
|||
|
|
@ -86,7 +86,8 @@ def _show_post_from_file(self, post_filename: str, liked_by: str,
|
|||
onion_domain: str,
|
||||
i2p_domain: str,
|
||||
mitm_servers: [],
|
||||
instance_software: {}) -> bool:
|
||||
instance_software: {},
|
||||
ua_str: str) -> bool:
|
||||
"""Shows an individual post from its filename
|
||||
"""
|
||||
if not os.path.isfile(post_filename):
|
||||
|
|
@ -166,7 +167,8 @@ def _show_post_from_file(self, post_filename: str, liked_by: str,
|
|||
buy_sites,
|
||||
auto_cw_cache,
|
||||
mitm_servers,
|
||||
instance_software)
|
||||
instance_software,
|
||||
ua_str)
|
||||
msg = msg.encode('utf-8')
|
||||
msglen = len(msg)
|
||||
set_html_post_headers(self, msglen,
|
||||
|
|
@ -247,7 +249,8 @@ def show_individual_post(self, ssml_getreq: bool, authorized: bool,
|
|||
onion_domain: str,
|
||||
i2p_domain: str,
|
||||
mitm_servers: [],
|
||||
instance_software: {}) -> bool:
|
||||
instance_software: {},
|
||||
ua_str: str) -> bool:
|
||||
"""Shows an individual post
|
||||
"""
|
||||
liked_by = None
|
||||
|
|
@ -354,7 +357,8 @@ def show_individual_post(self, ssml_getreq: bool, authorized: bool,
|
|||
onion_domain,
|
||||
i2p_domain,
|
||||
mitm_servers,
|
||||
instance_software)
|
||||
instance_software,
|
||||
ua_str)
|
||||
|
||||
fitness_performance(getreq_start_time, fitness,
|
||||
'_GET', 'show_individual_post',
|
||||
|
|
@ -584,7 +588,8 @@ def show_individual_at_post(self, ssml_getreq: bool, authorized: bool,
|
|||
i2p_domain: str,
|
||||
bold_reading_nicknames: {},
|
||||
mitm_servers: [],
|
||||
instance_software: {}) -> bool:
|
||||
instance_software: {},
|
||||
ua_str: str) -> bool:
|
||||
"""get an individual post from the path /@nickname/statusnumber
|
||||
"""
|
||||
if '/@' not in path:
|
||||
|
|
@ -697,7 +702,8 @@ def show_individual_at_post(self, ssml_getreq: bool, authorized: bool,
|
|||
onion_domain,
|
||||
i2p_domain,
|
||||
mitm_servers,
|
||||
instance_software)
|
||||
instance_software,
|
||||
ua_str)
|
||||
|
||||
fitness_performance(getreq_start_time, fitness,
|
||||
'_GET', 'show_individual_at_post',
|
||||
|
|
@ -1218,7 +1224,8 @@ def show_notify_post(self, authorized: bool,
|
|||
i2p_domain: str,
|
||||
bold_reading_nicknames: {},
|
||||
mitm_servers: [],
|
||||
instance_software: {}) -> bool:
|
||||
instance_software: {},
|
||||
ua_str: str) -> bool:
|
||||
"""Shows an individual post from an account which you are following
|
||||
and where you have the notify checkbox set on person options
|
||||
"""
|
||||
|
|
@ -1278,7 +1285,8 @@ def show_notify_post(self, authorized: bool,
|
|||
onion_domain,
|
||||
i2p_domain,
|
||||
mitm_servers,
|
||||
instance_software)
|
||||
instance_software,
|
||||
ua_str)
|
||||
fitness_performance(getreq_start_time, fitness,
|
||||
'_GET', 'show_notify_post',
|
||||
debug)
|
||||
|
|
|
|||
|
|
@ -3442,7 +3442,8 @@ def html_individual_post(recent_posts_cache: {}, max_recent_posts: int,
|
|||
min_images_for_accounts: [],
|
||||
buy_sites: {},
|
||||
auto_cw_cache: {}, mitm_servers: [],
|
||||
instance_software: {}) -> str:
|
||||
instance_software: {},
|
||||
ua_str: str) -> str:
|
||||
"""Show an individual post as html
|
||||
"""
|
||||
original_post_json = post_json_object
|
||||
|
|
@ -3472,8 +3473,18 @@ def html_individual_post(recent_posts_cache: {}, max_recent_posts: int,
|
|||
# Liked by handle
|
||||
domain_full = get_full_domain(domain, port)
|
||||
actor = '/users/' + nickname
|
||||
|
||||
# get the list of mutuals for the current account
|
||||
mutuals_list = get_mutuals_of_person(base_dir, nickname, domain)
|
||||
mutual_prefix = ''
|
||||
if by_str_handle in mutuals_list:
|
||||
if not text_mode_browser(ua_str):
|
||||
mutual_prefix = '⇆ '
|
||||
else:
|
||||
mutual_prefix = translate['Mutual'] + ' '
|
||||
|
||||
post_str += \
|
||||
'<p>' + by_text + ' '
|
||||
'<p>' + mutual_prefix + by_text + ' '
|
||||
post_str += \
|
||||
'<form method="POST" accept-charset="UTF-8" action="' + \
|
||||
actor + '/searchhandle">\n' + \
|
||||
|
|
|
|||
Loading…
Reference in New Issue