Do not append description button for filtered deck (#2266)

This commit is contained in:
Matthias Metelka 2022-12-11 06:03:11 +01:00 committed by GitHub
parent a06ee6b0bf
commit ec4c1b1a20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -277,7 +277,8 @@ class Overview:
links = [
["O", "opts", tr.actions_options()],
]
if self.mw.col.decks.current()["dyn"]:
is_dyn = self.mw.col.decks.current()["dyn"]
if is_dyn:
links.append(["R", "refresh", tr.actions_rebuild()])
links.append(["E", "empty", tr.studying_empty()])
else:
@ -285,7 +286,8 @@ class Overview:
# links.append(["F", "cram", _("Filter/Cram")])
if self.mw.col.sched.have_buried():
links.append(["U", "unbury", tr.studying_unbury()])
links.append(["", "description", tr.scheduling_description()])
if not is_dyn:
links.append(["", "description", tr.scheduling_description()])
link_handler = gui_hooks.overview_will_render_bottom(
self._linkHandler,
links,