Skip to content
Snippets Groups Projects
Commit 4cce150e authored by dos's avatar dos Committed by ave
Browse files

py,st3m: ViewManager: Add is_active(view) method

Makes it easy for views to know whether they're still the active
one, so unwanted activity can be skipped when transitioning out.
parent 78a90e0b
No related branches found
No related tags found
No related merge requests found
......@@ -258,3 +258,9 @@ class ViewManager(Responder):
return self._incoming.show_icons()
else:
return True
def is_active(self, view: View) -> bool:
"""
Returns true if the passed view is currently the active one.
"""
return self._incoming == view
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment