on develop help sign in
Properly remove deleted items from mergeWithMove
commit2fe0f566f8d6b6eceb178a85516643390111bb83 authorRyan Trinkle <ryan.trinkle@gmail.com> dateMon 8 May 2017, 11:23 (9 years ago) parent63cb8f8
1 file changed+2
src/Reflex/Spider/Internal.hs+2
src/Reflex/Spider/Internal.hs+2
@@ -1639,6 +1639,8 @@ mergeCheapWithMove = mergeCheap' getInitialSubscribers updateMe destroy DMap.siz
16391639 let moveOrDelete :: forall a. k a -> PatchDMapWithMove.NodeInfo k (Event x) a -> MergeSubscribedParentWithMove x k a -> Constant (EventM x (Maybe (EventSubscription x))) a
16401640 moveOrDelete _ ni parent = Constant $ case getComposeMaybe $ PatchDMapWithMove._nodeInfo_to ni of
16411641 Nothing -> do
1642+ oldHeight <- liftIO $ getEventSubscribedHeight $ _eventSubscription_subscribed $ _mergeSubscribedParentWithMove_subscription parent
1643+ liftIO $ modifyIORef heightBagRef $ heightBagRemove oldHeight
16421644 return $ Just $ _mergeSubscribedParentWithMove_subscription parent
16431645 Just toKey -> do
16441646 liftIO $ writeIORef (_mergeSubscribedParentWithMove_key parent) $! toKey