SHOW MOVE removed in conversation view for text mode browsers

main
Bob Mottram 2024-04-09 17:24:08 +01:00
parent d10637a832
commit d5459e1fab
4 changed files with 13 additions and 5 deletions

View File

@ -573,7 +573,7 @@ def daemon_http_get(self) -> None:
self.server.port,
self.server.debug,
self.server.session,
cookie):
cookie, ua_str):
fitness_performance(getreq_start_time, self.server.fitness,
'_GET', '_show_conversation_thread',
self.server.debug)

View File

@ -995,7 +995,7 @@ def show_conversation_thread(self, authorized: bool,
base_dir: str, http_prefix: str,
domain: str, port: int,
debug: str, curr_session,
cookie: str) -> bool:
cookie: str, ua_str: str) -> bool:
"""get conversation thread from the date link on a post
"""
if not path.startswith('/users/'):
@ -1056,7 +1056,8 @@ def show_conversation_thread(self, authorized: bool,
self.server.buy_sites,
self.server.blocked_cache,
self.server.block_federated,
self.server.auto_cw_cache)
self.server.auto_cw_cache,
ua_str)
if conv_str:
msg = conv_str.encode('utf-8')
msglen = len(msg)

View File

@ -16,6 +16,7 @@ from utils import get_domain_from_actor
from utils import is_public_post
from utils import get_attributed_to
from blocking import is_blocked
from webapp_utils import text_mode_browser
from webapp_utils import html_header_with_external_style
from webapp_utils import html_post_separator
from webapp_utils import html_footer
@ -50,7 +51,8 @@ def html_conversation_view(authorized: bool, post_id: str,
debug: bool, buy_sites: {},
blocked_cache: [],
block_federated: [],
auto_cw_cache: {}) -> str:
auto_cw_cache: {},
ua_str: str) -> str:
"""Show a page containing a conversation thread
"""
conv_posts = \
@ -125,5 +127,10 @@ def html_conversation_view(authorized: bool, post_id: str,
if post_str:
conv_str += text_mode_separator + separator_str + post_str
# if using a text mode browser then don't show SHOW MORE because there
# is no way to hide/expand sections
if text_mode_browser(ua_str):
conv_str = conv_str.replace(translate['SHOW MORE'], '')
conv_str += text_mode_separator + html_footer()
return conv_str

View File

@ -835,7 +835,7 @@ def html_timeline(default_timeline: str,
# left column
left_column_str = ''
if not text_mode_browser(ua_str):
if not is_text_browser:
left_column_str = \
get_left_column_content(base_dir, nickname, domain_full,
http_prefix, translate,