mirror of
https://github.com/ihabunek/toot
synced 2024-12-23 23:52:40 +01:00
Pass account as argument
This commit is contained in:
parent
0e535a3fd0
commit
6a54f3dd0e
@ -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)])
|
||||
|
Loading…
Reference in New Issue
Block a user