Skip to content

Commit

Permalink
Trying a new mechanism for collecting the initial app.
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Davis authored and Luke Davis committed Jul 14, 2023
1 parent 1ce257d commit 683778f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion addon/globalPlugins/versionCollector/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def __init__(self, *args, **kwargs):
# Run our handler whenever the application changes
post_appSwitch.register(self.onAppSwitch)
# Seed the pond
postNvdaStartup.register(self.onAppSwitch)
postNvdaStartup.register(self.collectInitialApp)
# Become aware of all NVDA add-ons
postNvdaStartup.register(self.retrieveInstalledAddons)

Expand Down Expand Up @@ -176,6 +176,11 @@ def onAppSwitch(self) -> None:
self.currentApp = currentApp
self.addToCacheOrUpdateDate(currentApp)

def collectInitialApp(self) -> None:
"""Called as a registered extensionPoint, when NVDA first finishes loading."""
wx.CallLater(1000, self.onAppSwitch)
postNvdaStartup.unregister(self.detectInitialApp)

def addToCacheOrUpdateDate(self, subject: _AppData) -> None:
ind = getCacheIndexOf(subject)
if ind < 0:
Expand Down
2 changes: 1 addition & 1 deletion buildVars.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def _(arg):
"addon_description": _("""Keeps a record of all software names and versions used while running NVDA.
Provides a list that can be copied/exported for diagnostics and support."""),
# version
"addon_version": "23.00.052",
"addon_version": "23.00.053",
# Author(s)
"addon_author": "Luke Davis <XLTechie@newanswertech.com>",
# URL for the add-on documentation support
Expand Down

0 comments on commit 683778f

Please sign in to comment.