Merge pull request #1261 from RumovZ/fix-id-checks

Fix id check for `today` and `card state` items
This commit is contained in:
Damien Elmes 2021-06-29 11:26:57 +10:00 committed by GitHub
commit d58619a0dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,7 +138,11 @@ class SidebarItem:
if other.item_type == self.item_type:
if self.item_type == SidebarItemType.TAG:
return self.full_name == other.full_name
elif self.item_type == SidebarItemType.SAVED_SEARCH:
elif self.item_type in (
SidebarItemType.SAVED_SEARCH,
SidebarItemType.TODAY,
SidebarItemType.CARD_STATE,
):
return self.name == other.name
elif self.item_type == SidebarItemType.NOTETYPE_TEMPLATE:
return (