Marco Arment on Nostr: If anyone else is nuts enough to use withObservationTracking(), let me save you ...
If anyone else is nuts enough to use withObservationTracking(), let me save you potentially a lot of time:
It only calls the onChange: block ONCE, BEFORE the first change. It does NOT provide continuous change notifications over time, and it works like a willSet, not a didSet.
I made a quick utility to get Combine publishers for Observable key-paths, which is easier and cleaner for me to use. Does this look right? It works…
https://gist.github.com/marcoarment/88ee13df326c25c1f0a68c09e086f03fPublished at
2023-11-19 20:48:38Event JSON
{
"id": "9636245b037edbf1366482521991477488cfa89af5db8104a729b5838db2c18f",
"pubkey": "70c41b3df895492571e14efedd1a8a2a56ad800c8a81c2553cebbe7fa9f64af8",
"created_at": 1700426918,
"kind": 1,
"tags": [
[
"proxy",
"https://mastodon.social/users/marcoarment/statuses/111439178521180217",
"activitypub"
]
],
"content": "If anyone else is nuts enough to use withObservationTracking(), let me save you potentially a lot of time:\n\nIt only calls the onChange: block ONCE, BEFORE the first change. It does NOT provide continuous change notifications over time, and it works like a willSet, not a didSet.\n\nI made a quick utility to get Combine publishers for Observable key-paths, which is easier and cleaner for me to use. Does this look right? It works… https://gist.github.com/marcoarment/88ee13df326c25c1f0a68c09e086f03f",
"sig": "27ba4c351480f203f5c5bac3d924705f662694fbc649797072d6950ad03a8775d3dcbe2bfc136bab0514062ee99e4342e34b0efbaf66a5cb7fb5759c336a41da"
}