From 6a54f3dd0e316c9207dfe93dc2aa12801a670775 Mon Sep 17 00:00:00 2001 From: Ivan Habunek Date: Fri, 3 Feb 2023 05:45:18 +0100 Subject: [PATCH] Pass account as argument --- toot/tui/overlays.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/toot/tui/overlays.py b/toot/tui/overlays.py index 41d9901..1db78fe 100644 --- a/toot/tui/overlays.py +++ b/toot/tui/overlays.py @@ -212,14 +212,11 @@ class Help(urwid.Padding): class Account(urwid.ListBox): """Shows account data and provides various actions""" def __init__(self, account): - self.account = account - actions = list(self.generate_contents()) + actions = list(self.generate_contents(account)) walker = urwid.SimpleListWalker(actions) super().__init__(walker) - def generate_contents(self): - account = self.account - + def generate_contents(self, account): def link(text, url): attr_map = {"link": "link_focused"} text = SelectableText([text, ("link", url)])