portal.updated() now correctly checks for the most recent entry (both timestamp and editstamp-wise). Before, it just blindly picked the last entry in the list.
Also, json.port gets sorted by activity on home.save.
I initially thought about sorting it in feed.register, but opted against it. Feeds can update on the fly and the order determined in feed.register can already be outdated when saving.
Additionally, this doesn't "magically fix" your portal.json. You still need to invoke a save by f.e. following someone or posting something. Automatically invoking a save after sorting would just bloat the history.
Edit: Yet again, I'm smuggling in an unrelated fix. When using the undat command, entries from the unfollowed portal still ghosted around. This PR introduces portal.entries_remove() (named after portal.entries) invoking element.remove_element() (named after element.to_element()).
Edit 2: And two more fixes: Remove zombie entries from the feed (entries without any containing portal) and handle entry updates properly again (add entry.update(data, host)).
portal.updated()
now correctly checks for the most recent entry (both timestamp and editstamp-wise). Before, it just blindly picked the last entry in the list.Also,
json.port
gets sorted by activity onhome.save
.I initially thought about sorting it in
feed.register
, but opted against it. Feeds can update on the fly and the order determined infeed.register
can already be outdated when saving.Additionally, this doesn't "magically fix" your portal.json. You still need to invoke a save by f.e. following someone or posting something. Automatically invoking a save after sorting would just bloat the history.
Edit: Yet again, I'm smuggling in an unrelated fix. When using the undat command, entries from the unfollowed portal still ghosted around. This PR introduces
portal.entries_remove()
(named afterportal.entries
) invokingelement.remove_element()
(named afterelement.to_element()
).Edit 2: And two more fixes: Remove zombie entries from the feed (entries without any containing portal) and handle entry updates properly again (add
entry.update(data, host)
).