Compact and rank pinned mobile work
This commit is contained in:
1 parent
5f9b5b3a7f
commit
2766a75f24
8 files changed
+131
-23
No files matched your search
@@ -141,9 +141,9 @@ class RecentWorkStore:
|
||||
state, _legacy = self._state(row, login)
|
||||
state["items"] = [normalized, *(entry for entry in state["items"] if entry["route"] != normalized["route"])][: self.limit]
|
||||
state["pinned"] = [
|
||||
normalized if entry["route"] == normalized["route"] else entry
|
||||
for entry in state["pinned"]
|
||||
]
|
||||
normalized,
|
||||
*(entry for entry in state["pinned"] if entry["route"] != normalized["route"]),
|
||||
] if any(entry["route"] == normalized["route"] for entry in state["pinned"]) else state["pinned"]
|
||||
self._write(connection, login, state)
|
||||
return state
|
||||
|
||||
|
||||
Reference in new issue
Block a user