Pass account as argument

This commit is contained in:
Ivan Habunek 2023-02-03 05:45:18 +01:00
parent 0e535a3fd0
commit 6a54f3dd0e
No known key found for this signature in database
GPG Key ID: F5F0623FF5EBCB3D
1 changed files with 2 additions and 5 deletions

View File

@ -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)])