Actually use the user cache
This commit is contained in:
parent
69ff0a40b8
commit
d13ab3ba6e
6
User.py
6
User.py
@ -57,10 +57,10 @@ class User:
|
||||
|
||||
@staticmethod
|
||||
def new_or_cached(api, username: str): # -> User:
|
||||
if username in User._usercache:
|
||||
return User._usercache[username]
|
||||
if username not in User._usercache:
|
||||
User._usercache[username] = User(api, username)
|
||||
|
||||
return User(api, username)
|
||||
return User._usercache[username]
|
||||
|
||||
def _get_gallery(self) -> List[Submission.Submission]:
|
||||
submissions = []
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user