<commit_before>enyo.kind({
	name: "menuList",
	classes: "menuList",
	style: "height: 100%;",
	published: {
		loading: false,
	},
	components: [
		{kind: "Waiter"},
		{kind: "List", name: "menu", style: "height: 100%;", classes: "enyo-unselectable preventDragTap menu", onSetupItem: "setupRow", toggleSelected: true, components: [
			{name: "divider", kind: "Divider"},
			{kind: "menuItem", classes: "item enyo-border-box"}
		]}
	],
	setupRow: function(inSender, inEvent) {
		var i = inEvent.index, r = this.menu[i], item = this.$.menuItem, divider = this.$.divider;
		if(r.type === "header"){
			item.hide();
			divider.show();
			divider.setCaption( r.headerType === "date" ? formatDate(storage.dateStringToDate(r.header)) : r.header );
		} else {
			divider.hide();
			item.show();
			r.showDetails = inEvent.selected;
			item.setMenuItem(r);
		}
		return true;
	},
	loadingChanged : function(){
		if(this.loading){
			this.$.menu.setCount(0);
			this.$.menu.refresh();
		}
		this.$.waiter.setShowing( this.loading )
	},
	load: function(){
		this.$.menu.setCount(this.menu.length);
		this.$.menu.refresh();
		this.setLoading(false);
	}
});

enyo.kind({
	name: "Waiter",
	components: [<commit_msg>refreh menu list on tap (length might has changed)<commit_after>enyo.kind({
	name: "menuList",
	classes: "menuList",
	style: "height: 100%;",
	published: {
		loading: false,
	},
	components: [
		{kind: "Waiter"},
		{kind: "List", name: "menu", style: "height: 100%;", classes: "enyo-unselectable preventDragTap menu", onSetupItem: "setupRow", toggleSelected: true, components: [
			{name: "divider", kind: "Divider"},
			{kind: "menuItem", classes: "item enyo-border-box"}
		]}
	],
	tap: function(){
		// menu list length has probably changed
		this.$.menu.refresh();
	},
	setupRow: function(inSender, inEvent) {
		var i = inEvent.index, r = this.menu[i], item = this.$.menuItem, divider = this.$.divider;
		if(r.type === "header"){
			item.hide();
			divider.show();
			divider.setCaption( r.headerType === "date" ? formatDate(storage.dateStringToDate(r.header)) : r.header );
		} else {
			divider.hide();
			item.show();
			r.showDetails = inEvent.selected;
			item.setMenuItem(r);
		}
		return true;
	},
	loadingChanged : function(){
		if(this.loading){
			this.$.menu.setCount(0);
			this.$.menu.refresh();
		}
		this.$.waiter.setShowing( this.loading )
	},
	load: function(){
		this.$.menu.setCount(this.menu.length);
		this.$.menu.refresh();
		this.setLoading(false);
	}
});

enyo.kind({
	name: "Waiter",
	components: [
{'fraction_non_alphanumeric': 0.19603960396039605, 'fraction_numerical': 0.005544554455445544, 'mean_word_length': 4.062124248496994, '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': '5261547', 'n_tokens_mistral': 1017, 'n_tokens_neox': 923, 'n_words': 185}