mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
fix collection_did_load() not being called, and remove dead code
https://anki.tenderapp.com/discussions/ankidesktop/39765-_colloadingstate-is-never-run-thus-collection_did_load-hook-is-never-triggered
This commit is contained in:
parent
7d94465256
commit
f429986246
1 changed files with 1 additions and 8 deletions
|
@ -466,6 +466,7 @@ close the profile or restart Anki."""
|
|||
|
||||
self.setEnabled(True)
|
||||
self.maybeEnableUndo()
|
||||
gui_hooks.collection_did_load(self.col)
|
||||
self.moveToState("deckBrowser")
|
||||
return True
|
||||
|
||||
|
@ -602,14 +603,6 @@ from the profile screen."
|
|||
self.maybe_check_for_addon_updates()
|
||||
self.deckBrowser.show()
|
||||
|
||||
def _colLoadingState(self, oldState) -> None:
|
||||
"Run once, when col is loaded."
|
||||
self.enableColMenuItems()
|
||||
# ensure cwd is set if media dir exists
|
||||
self.col.media.dir()
|
||||
gui_hooks.collection_did_load(self.col)
|
||||
self.moveToState("overview")
|
||||
|
||||
def _selectedDeck(self) -> Optional[Dict[str, Any]]:
|
||||
did = self.col.decks.selected()
|
||||
if not self.col.decks.nameOrNone(did):
|
||||
|
|
Loading…
Reference in a new issue