on develop help sign in
Properly remove deleted items from mergeWithMove
2fe0f56Ryan Trinkle
src/Reflex/Spider/Internal.hs+2
@@ -1639,6 +1639,8 @@ mergeCheapWithMove = mergeCheap' getInitialSubscribers updateMe destroy DMap.siz
1639 let moveOrDelete :: forall a. k a -> PatchDMapWithMove.NodeInfo k (Event x) a -> MergeSubscribedParentWithMove x k a -> Constant (EventM x (Maybe (EventSubscription x))) a
1639 let moveOrDelete :: forall a. k a -> PatchDMapWithMove.NodeInfo k (Event x) a -> MergeSubscribedParentWithMove x k a -> Constant (EventM x (Maybe (EventSubscription x))) a
1640 moveOrDelete _ ni parent = Constant $ case getComposeMaybe $ PatchDMapWithMove._nodeInfo_to ni of
1640 moveOrDelete _ ni parent = Constant $ case getComposeMaybe $ PatchDMapWithMove._nodeInfo_to ni of
1641 Nothing -> do
1641 Nothing -> do
1642+ oldHeight <- liftIO $ getEventSubscribedHeight $ _eventSubscription_subscribed $ _mergeSubscribedParentWithMove_subscription parent
1643+ liftIO $ modifyIORef heightBagRef $ heightBagRemove oldHeight
1642 return $ Just $ _mergeSubscribedParentWithMove_subscription parent
1644 return $ Just $ _mergeSubscribedParentWithMove_subscription parent
1643 Just toKey -> do
1645 Just toKey -> do
1644 liftIO $ writeIORef (_mergeSubscribedParentWithMove_key parent) $! toKey
1646 liftIO $ writeIORef (_mergeSubscribedParentWithMove_key parent) $! toKey