Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
C-Loftus committed Apr 6, 2024
1 parent 792e291 commit bec18e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions core/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@

class CallbackState:
last_mode: ClassVar[Optional[str]] = None

# We have to keep track of the last title so we don't repeat it
# since sometimes Talon triggers a "title switch" when
# the title actually hasn't changed, i.e. when a text file is saved
last_title: ClassVar[Optional[str]] = None


Expand Down Expand Up @@ -34,10 +38,7 @@ def on_app_switch(app):
actions.user.echo_context()


# We have to keep track of the last title so we don't repeat it
# since sometimes Talon triggers a "title switch" when
# the title actually hasn't changed, i.e. when a text file is saved
last_title = None



def on_title_switch(win):
Expand Down
2 changes: 1 addition & 1 deletion core/core-agnostic.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@


class AgnosticState:
# Store the handle for the subprocess that will cancel the current speaker
speaker_cancel_callback: ClassVar[Optional[Callable]] = None


Expand All @@ -26,7 +27,6 @@ def initialize_settings():
# initialize the settings only after the user settings have been loaded
app.register("ready", initialize_settings)

speaker_cancel_callback: Optional[Callable] = None


@mod.action_class
Expand Down

0 comments on commit bec18e9

Please sign in to comment.