From f255b7a41ace1cb7a80f00af5a3b66c31cd25323 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 15 Apr 2024 16:24:39 +0100 Subject: [PATCH] Tidying --- daemon_get.py | 5 ++++- daemon_get_buttons.py | 13 ++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/daemon_get.py b/daemon_get.py index 9159bdc8e..4eea8ff92 100644 --- a/daemon_get.py +++ b/daemon_get.py @@ -3274,7 +3274,10 @@ def daemon_http_get(self) -> None: getreq_start_time, self.server.debug, self.server.recent_posts_cache, - curr_session) + curr_session, + self.server.iconsCache, + self.server.project_version, + self.server.fitness) self.server.getreq_busy = False return diff --git a/daemon_get_buttons.py b/daemon_get_buttons.py index c234b5c85..fad2bff41 100644 --- a/daemon_get_buttons.py +++ b/daemon_get_buttons.py @@ -292,7 +292,10 @@ def announce_button_undo(self, calling_domain: str, path: str, http_prefix: str, domain: str, domain_full: str, onion_domain: str, i2p_domain: str, getreq_start_time, debug: bool, - recent_posts_cache: {}, curr_session) -> None: + recent_posts_cache: {}, curr_session, + icons_cache: {}, + project_version: str, + fitness: {}) -> None: """Undo announce/repeat button was pressed """ page_number = 1 @@ -386,8 +389,8 @@ def announce_button_undo(self, calling_domain: str, path: str, } } # clear the icon from the cache so that it gets updated - if self.server.iconsCache.get('repeat_inactive.png'): - del self.server.iconsCache['repeat_inactive.png'] + if icons_cache.get('repeat_inactive.png'): + del icons_cache['repeat_inactive.png'] # delete the announce post if '?unannounce=' in path: @@ -406,7 +409,7 @@ def announce_button_undo(self, calling_domain: str, path: str, debug, recent_posts_cache, True) post_to_outbox(self, new_undo_announce, - self.server.project_version, + project_version, self.post_to_nickname, curr_session, proxy_type) @@ -421,7 +424,7 @@ def announce_button_undo(self, calling_domain: str, path: str, actor_path_str = \ actor_absolute + '/' + timeline_str + '?page=' + \ str(page_number) + first_post_id + timeline_bookmark - fitness_performance(getreq_start_time, self.server.fitness, + fitness_performance(getreq_start_time, fitness, '_GET', '_undo_announce_button', debug) redirect_headers(self, actor_path_str, cookie, calling_domain)