<commit_before>(function(){

    Ti.include('../utils/projectParsers.js', '../Editors/project_editor.js', '../database/projectsDB.js', '../net/getProjects.js');
    
    var projects = [];
    var user = Titanium.App.Properties.getString("user");
    var pass = Titanium.App.Properties.getString("pass");
    
    createNewTableView = function(projects){
        var tableview = Titanium.UI.createTableView();
        tableview.setData(projects);
		
        tableview.addEventListener('click', function(e){
            Titanium.API.info("tableview event triggered: " + e.rowData.title);
            var w = createProjectEditor(e.rowData);
            
            w.open({
                modal: true
            });
        });
        
        return tableview;
    };
    
    
    showProjects = function(){
        var projects = getAllFromProjectsDB();
		
        var tableView = createNewTableView(projects);
		
		Titanium.UI.currentWindow.add(tableView);
        
        updateProjectView = function(projects){
            tableView.setData(projects);
        };
        updateProjectView(projects);
    };
    
    showProjects();
    
})();<commit_msg>Added refresh on project table view load (with activity indicator)<commit_after>(function(){

    Ti.include('../utils/projectParsers.js', '../Editors/project_editor.js', '../database/projectsDB.js', '../net/getProjects.js');
    
    var projects = [];
    var user = Titanium.App.Properties.getString("user");
    var pass = Titanium.App.Properties.getString("pass");
	
	var projWin = Titanium.UI.currentWindow;
	
    var actInd = Titanium.UI.createActivityIndicator({
        bottom: 10,
        height: 50,
        width: 10,
		top: 20,
        style: Titanium.UI.iPhone.ActivityIndicatorStyle.BIG
    });
	
    createNewTableView = function(projects){
        var tableview = Titanium.UI.createTableView();
        tableview.setData(projects);
        
        tableview.addEventListener('click', function(e){
            Titanium.API.info("tableview event triggered: " + e.rowData.title);
            var w = createProjectEditor(e.rowData);
            
            w.open({
                modal: true
            });
        });
        
        return tableview;
    };
    
    
    showProjects = function(){
		projWin.add(actInd);
        actInd.show();
        setTimeout(endReloading, 2000);
        
        initProjectDB();
        
        getProjects(function(project){
            updateProjectsDB(project);
            
        });

    };
    
    function endReloading(){
        var projects = getAllFromProjectsDB();
        
        var tableView = createNewTableView(projects);
        
        projWin.add(tableView);
        
        updateProjectView = function(projects){
            tableView.setData(projects);
        };
        updateProjectView(projects);
		actInd.hide();
        
    }
	
    
    showProjects();
    
})();
{'fraction_non_alphanumeric': 0.12658227848101267, 'fraction_numerical': 0.004105371193978789, 'mean_word_length': 2.0082304526748973, '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': '6863781', 'n_tokens_mistral': 844, 'n_tokens_neox': 797, 'n_words': 129}