Remove pointless local_highlights

An event can only be considered a highlight if a push rule make it so,
thus an event can never be locally highlighted only.
This commit is contained in:
miruka
2020-11-03 06:43:30 -04:00
parent 35a8c0aec4
commit 2ef1edb3dc
8 changed files with 21 additions and 46 deletions

View File

@@ -69,7 +69,6 @@ class Account(ModelItem):
total_unread: int = 0
total_highlights: int = 0
local_unreads: bool = False
local_highlights: bool = False
# For some reason, Account cannot inherit Presence, because QML keeps
# complaining type error on unknown file
@@ -165,10 +164,9 @@ class Room(ModelItem):
last_event_date: datetime = ZERO_DATE
unreads: int = 0
highlights: int = 0
local_unreads: bool = False
local_highlights: bool = False
unreads: int = 0
highlights: int = 0
local_unreads: bool = False
lexical_sorting: bool = False
bookmarked: bool = False
@@ -207,7 +205,6 @@ class Room(ModelItem):
self.left,
bool(other.inviter_id),
bool(other.highlights),
bool(other.local_highlights),
bool(other.unreads),
bool(other.local_unreads),
other.last_event_date,
@@ -220,7 +217,6 @@ class Room(ModelItem):
other.left,
bool(self.inviter_id),
bool(self.highlights),
bool(self.local_highlights),
bool(self.unreads),
bool(self.local_unreads),
self.last_event_date,
@@ -264,7 +260,6 @@ class AccountOrRoom(Account, Room):
self.left,
bool(other.inviter_id),
bool(other.highlights),
bool(other.local_highlights),
bool(other.unreads),
bool(other.local_unreads),
other.last_event_date,
@@ -279,7 +274,6 @@ class AccountOrRoom(Account, Room):
other.left,
bool(self.inviter_id),
bool(self.highlights),
bool(self.local_highlights),
bool(self.unreads),
bool(self.local_unreads),
self.last_event_date,