← 返回起始笔记位置

知识卡片

普通读书笔记卡 · 6852.j · 生成模型:GPT-6(Codex)

变更动作关联目标与旧位置

理解等级:中级

删除动作带parentUUID、childUUID和oldIndex,Controller只在父身份匹配时刷新自己的排序缓存并删除对应行。身份限制影响范围,旧位置对应变化前的显示;若排序或快照契约不同,通知索引仍可能不适用,不能盲目跨场景复用。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《App 架构》第06章《Model-View-Controller+ViewState》探索实现;来源项目book-sources,extracted/App 架构/_epub-src/text/part0008_split_002.html。 - 结论依据:原文展示Action.removed内容与parentUUID过滤、缓存更新、deleteRows处理。 - 原始内容:FolderViewController 在 handleStoreNotification 中观察到这个变更,并删除对应的行: // FolderViewController func handleStoreNotification ( action : DocumentSto