Skip to content

Commit

Permalink
Fix highlighting the wrong tab due to my
Browse files Browse the repository at this point in the history
  • Loading branch information
QCanvas committed Jul 29, 2024
1 parent de10ed2 commit 42a6b52
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
5 changes: 5 additions & 0 deletions deploy/flatpak/io.github.qcanvas.QCanvasApp.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
</screenshot>
</screenshots>
<releases>
<release version="v1.0.10.post3" date="2024-07-29">
<ul>
<li>Fixed highlighting the wrong tab when there was an update</li>
</ul>
</release>
<release version="v1.0.10.post2" date="2024-07-28"></release>
<release version="v1.0.10.post1" date="2024-07-28"></release>
<release version="v1.0.9.dev1" date="2024-07-25"></release>
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "qcanvas"
version = "1.0.10.post2"
version = "1.0.11"
description = "QCanvas is a desktop client for Canvas LMS."
authors = ["QCanvas <QCanvas@noreply.codeberg.org>"]
readme = "README.md"
Expand Down
11 changes: 6 additions & 5 deletions qcanvas/ui/course_viewer/course_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,18 @@ def _highlight_tabs(self, sync_receipt: SyncReceipt) -> None:
updates = sync_receipt.updates_by_course.get(self._course_id, None)

if updates is not None:
if len(updates.updated_resources) > 0:
self._highlight_tab(0)
# if len(updates.updated_resources) > 0:
# raise Exception("Looks like you forgot to update the other numbers??????"")
# self._highlight_tab(0)

if len(updates.updated_pages) > 0:
self._highlight_tab(1)
self._highlight_tab(0)

if len(updates.updated_assignments) > 0:
self._highlight_tab(2)
self._highlight_tab(1)

if len(updates.updated_messages) > 0:
self._highlight_tab(3)
self._highlight_tab(2)
else:
for index in range(0, 4):
self._unhighlight_tab(index)
Expand Down

0 comments on commit 42a6b52

Please sign in to comment.