<commit_before>YUI.add("view-nav", function(Y) {
    "use strict";
    
    var models    = Y.namespace("Tristis.Models"),
        templates = Y.namespace("Tristis.Templates"),
        Nav;
    
    Nav = Y.Base.create("nav", Y.View, [], {
        
        events : {
            "a" : {
                click : "_navClick"
            }
        },
        
        template : templates.nav,
        
        initializer : function() {
            this._handles = [
                models.user.after([ "change", "reset" ], this.render, this),
                models.timelines.after([ "change", "reset" ], this._renderLists, this)
            ];
        },
        
        destructor : function() {
            new Y.EventTarget(this._handles).detach();
            
            this._handles = this._urlEvent = null;
        },
        
        render : function() {
            this.get("container").setHTML(
                this.template({
                    user      : models.user.toJSON(),
                    timelines : models.timelines.toJSON(),
                    
                    _t : {
                        timelines : templates["nav-timelines"]
                    }
                })
            );
            
            this._renderLists();
        },
        
        _renderLists : function() {
            this.get("container").one(".timelines").setHTML(
                templates["nav-timelines"]({<commit_msg>Nav.updated() for showing unread counts<commit_after>YUI.add("view-nav", function(Y) {
    "use strict";
    
    var models    = Y.namespace("Tristis.Models"),
        templates = Y.namespace("Tristis.Templates"),
        Nav;
    
    Nav = Y.Base.create("nav", Y.View, [], {
        
        events : {
            "a" : {
                click : "_navClick"
            }
        },
        
        template : templates.nav,
        
        initializer : function() {
            this._handles = [
                models.user.after([ "change", "reset" ], this.render, this),
                models.timelines.after([ "change", "reset" ], this._renderLists, this)
            ];
        },
        
        destructor : function() {
            new Y.EventTarget(this._handles).detach();
            
            this._handles = this._urlEvent = null;
        },
        
        render : function() {
            this.get("container").setHTML(
                this.template({
                    user      : models.user.toJSON(),
                    timelines : models.timelines.toJSON(),
                    
                    _t : {
                        timelines : templates["nav-timelines"]
                    }
                })
            );
            
            this._renderLists();
        },
        
        updated : function(args) {
            var list  = this.get("container").one("[data-id='" + args.id + "']"),
                count = parseInt(list.getData("updates"), 10) || 0;
            
            list.setAttribute("data-updates", args.count + count);
        },
        
        _renderLists : function() {
            this.get("container").one(".timelines").setHTML(
                templates["nav-timelines"]({
{'fraction_non_alphanumeric': 0.13458528951486698, 'fraction_numerical': 0.0009389671361502347, 'mean_word_length': 1.1741496598639456, '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': '3904216', 'n_tokens_mistral': 851, 'n_tokens_neox': 822, 'n_words': 126}