<commit_before>import Foundation

extension MCreatePlan
{
    private func removed(stop:DPlanStop)
    {
        plan.disconnect(
            database:database,
            stop:stop)
        { [weak self] in
            
            
        }
    }
    
    //MARK: internal
    
    func remove(stop:DPlanStop)
    {
        database.delete(data:stop)
        { [weak self] in
            
            self?.removed(stop:stop)
        }
    }
}<commit_msg>Remove annotation after disconnect<commit_after>import Foundation

extension MCreatePlan
{
    private func removed(stop:DPlanStop)
    {
        plan.disconnect(
            database:database,
            stop:stop)
        { [weak self] in
            
            self?.removedDone(stop:stop)
        }
    }
    
    private func removedDone(stop:DPlanStop)
    {
        DispatchQueue.main.async
        { [weak self] in
            
            self?.removeAnnotation(stop:stop)
            self?.updateStops()
        }
    }
    
    private func removeAnnotation(stop:DPlanStop)
    {
        guard
            
            let view:VCreateStatusReady = model?.view?.view as? VCreateStatusReady
            
        else
        {
            return
        }
        
        view.viewMap.removeAnnotation(stop)
    }
    
    //MARK: internal
    
    func remove(stop:DPlanStop)
    {
        database.delete(data:stop)
        { [weak self] in
            
            self?.removed(stop:stop)
        }
    }
}
{'fraction_non_alphanumeric': 0.08428860418071477, 'fraction_numerical': 0.0, 'mean_word_length': 1.344391785150079, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6073101', 'n_tokens_mistral': 416, 'n_tokens_neox': 414, 'n_words': 69}