<commit_before>import UIKit

final class VCreateStatusReadyBarStops:
    VCollection<
    ArchCreate,
    VCreateStatusReadyBarStopsCell>
{
    weak var viewTravel:VCreateStatusReadyBarTravel!
    let kInsetsTop:CGFloat = 10
    private var cellSize:CGSize?
    private let footerSize:CGSize
    private let kFooterHeight:CGFloat = 80
    private let kCellHeight:CGFloat = 50
    
    required init(controller:CCreate)
    {
        footerSize = CGSize(
            width:0,
            height:kFooterHeight)
        
        super.init(controller:controller)
        config()
    }
    
    required init?(coder:NSCoder)
    {
        return nil
    }
    
    override func scrollViewDidScroll(
        _ scrollView:UIScrollView)
    {
        viewTravel.collectionView.contentOffset = scrollView.contentOffset
    }
    
    override func collectionView(
        _ collectionView:UICollectionView,
        layout collectionViewLayout:UICollectionViewLayout,
        referenceSizeForFooterInSection section:Int) -> CGSize
    {
        guard
        
            let count:Int = model?.count,
            count > 0
        
        else
        {
            return CGSize.zero
        }
        
        return footerSize
    }
    
    override func collectionView(
        _ collectionView:UICollectionView,
        layout collectionViewLayout:UICollectionViewLayout,
        sizeForItemAt indexPath:IndexPath) -> CGSize
    {
        guard
        
            let cellSize:CGSize = self.cellSize
        
        else
        {
            let width:CGFloat = collectionView.bounds.width
            let cellSize:CGSize = CGSize(
                width:width,
                height:kCellHeight)
            self.cellSize = cellSize
            
            return cellSize
        }<commit_msg>Footer only visible if more than 2 stops<commit_after>import UIKit

final class VCreateStatusReadyBarStops:
    VCollection<
    ArchCreate,
    VCreateStatusReadyBarStopsCell>
{
    weak var viewTravel:VCreateStatusReadyBarTravel!
    let kInsetsTop:CGFloat = 10
    private var cellSize:CGSize?
    private let footerSize:CGSize
    private let kFooterHeight:CGFloat = 80
    private let kCellHeight:CGFloat = 50
    
    required init(controller:CCreate)
    {
        footerSize = CGSize(
            width:0,
            height:kFooterHeight)
        
        super.init(controller:controller)
        config()
    }
    
    required init?(coder:NSCoder)
    {
        return nil
    }
    
    override func scrollViewDidScroll(
        _ scrollView:UIScrollView)
    {
        viewTravel.collectionView.contentOffset = scrollView.contentOffset
    }
    
    override func collectionView(
        _ collectionView:UICollectionView,
        layout collectionViewLayout:UICollectionViewLayout,
        referenceSizeForFooterInSection section:Int) -> CGSize
    {
        guard
        
            let count:Int = model?.count,
            count > 1
        
        else
        {
            return CGSize.zero
        }
        
        return footerSize
    }
    
    override func collectionView(
        _ collectionView:UICollectionView,
        layout collectionViewLayout:UICollectionViewLayout,
        sizeForItemAt indexPath:IndexPath) -> CGSize
    {
        guard
        
            let cellSize:CGSize = self.cellSize
        
        else
        {
            let width:CGFloat = collectionView.bounds.width
            let cellSize:CGSize = CGSize(
                width:width,
                height:kCellHeight)
            self.cellSize = cellSize
            
            return cellSize
        }
{'fraction_non_alphanumeric': 0.05456048498208873, 'fraction_numerical': 0.00468448608432075, 'mean_word_length': 1.8271028037383177, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '6883018', 'n_tokens_mistral': 1000, 'n_tokens_neox': 975, 'n_words': 191}