1
0
mirror of https://github.com/ihabunek/toot synced 2024-12-24 16:10:52 +01:00

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

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