<commit_before>function UserDetailAssistant(argFromPusher) {
	/* this is the creator function for your scene assistant object. It will be passed all the 
	   additional parameters (after the scene name) that were passed to pushScene. The reference
	   to the scene controller (this.controller) has not be established yet, so any initialization
	   that needs the scene controller should be done in the setup function below. */
	
	scene_helpers.addCommonSceneMethods(this);	
	
	if (sc.helpers.isString(argFromPusher) || sc.helpers.isNumber(argFromPusher)) {
		/*
			we were passed a single arg, so we need to retrieve the user data
		*/
		this.userid  = argFromPusher;
		this.userRetrieved = false;
	} else {
		this.userobj = argFromPusher.userobj;
		this.userRetrieved = true;
	}
	
}

UserDetailAssistant.prototype.setup = function() {
	
	this.initAppMenu();
	
	this.setupCommonMenus({
		viewMenuItems: [
			{
				items: [
					{label:$L('Back'),        icon:'back', command:'back'},
					{label:$L('User Detail'), command:'scroll-top'}
				]
			},
			{
				items: [
					{label:$L('Compose'),  icon:'compose', command:'compose', shortcut:'N'},
				]
			}
			
		],
	});

	this.scroller = this.controller.getSceneScroller();
	
	
	/* this function is for setup tasks that have to happen when the scene is first created */
		
	/* use Mojo.View.render to render view templates and add them to the scene, if needed. */
	
	/* setup widgets here */
	
	
	
	/* add event handlers to listen to events from widgets */
	
	jQuery().bind('new_user_timeline_data', { thisAssistant:this }, function(e, tweets) {

		this.userobj = tweets[0].user;
		this.userRetrieved = true;		

		var itemhtml = Mojo.View.render({object:this.userobj, template: 'user-detail/user-detail'});
		jQuery('#user-detail').html(itemhtml);
		
		

		/*
			reverse the tweets for collection rendering (faster)
		*/
		var rendertweets = tweets;
		rendertweets.reverse();

		jQuery.each( rendertweets, function() {
			this.text = makeItemsClickable(this.text);
		});

		/*
			Render the new tweets as a collection (speed increase, I suspect)
		*/
		var itemhtml = Mojo.View.render({collection: rendertweets, template: 'shared/tweet'});
		jQuery('#user-timeline').html(itemhtml);

		/*
			Update relative dates
		*/
		sch.updateRelativeTimes('#user-timeline>div.timeline-entry>.status>.meta>.date', 'data-created_at');
		// e.data.thisAssistant.spinnerOff();
<commit_msg>- fixed reversed order of user detail timeline<commit_after>function UserDetailAssistant(argFromPusher) {
	/* this is the creator function for your scene assistant object. It will be passed all the 
	   additional parameters (after the scene name) that were passed to pushScene. The reference
	   to the scene controller (this.controller) has not be established yet, so any initialization
	   that needs the scene controller should be done in the setup function below. */
	
	scene_helpers.addCommonSceneMethods(this);	
	
	if (sc.helpers.isString(argFromPusher) || sc.helpers.isNumber(argFromPusher)) {
		/*
			we were passed a single arg, so we need to retrieve the user data
		*/
		this.userid  = argFromPusher;
		this.userRetrieved = false;
	} else {
		this.userobj = argFromPusher.userobj;
		this.userRetrieved = true;
	}
	
}

UserDetailAssistant.prototype.setup = function() {
	
	this.initAppMenu();
	
	this.setupCommonMenus({
		viewMenuItems: [
			{
				items: [
					{label:$L('Back'),        icon:'back', command:'back'},
					{label:$L('User Detail'), command:'scroll-top'}
				]
			},
			{
				items: [
					{label:$L('Compose'),  icon:'compose', command:'compose', shortcut:'N'},
				]
			}
			
		],
	});

	this.scroller = this.controller.getSceneScroller();
	
	
	/* this function is for setup tasks that have to happen when the scene is first created */
		
	/* use Mojo.View.render to render view templates and add them to the scene, if needed. */
	
	/* setup widgets here */
	
	
	
	/* add event handlers to listen to events from widgets */
	
	jQuery().bind('new_user_timeline_data', { thisAssistant:this }, function(e, tweets) {

		this.userobj = tweets[0].user;
		this.userRetrieved = true;		

		var itemhtml = Mojo.View.render({object:this.userobj, template: 'user-detail/user-detail'});
		jQuery('#user-detail').html(itemhtml);

		var rendertweets = tweets;
		// they come in oldest-first, so reverse it since we're rendering as a collection
		rendertweets = rendertweets.reverse(); 

		jQuery.each( rendertweets, function() {
			this.text = makeItemsClickable(this.text);
		});

		/*
			Render the new tweets as a collection (speed increase, I suspect)
		*/
		var itemhtml = Mojo.View.render({collection: rendertweets, template: 'shared/tweet'});
		jQuery('#user-timeline').html(itemhtml);

		/*
			Update relative dates
		*/
		sch.updateRelativeTimes('#user-timeline>div.timeline-entry>.status>.meta>.date', 'data-created_at');
		// e.data.thisAssistant.spinnerOff();

{'fraction_non_alphanumeric': 0.126094927683846, 'fraction_numerical': 0.00040741495212874313, 'mean_word_length': 3.6452223273415325, 'pattern_counts': {'":': 0, '<': 3, '<?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': '6631992', 'n_tokens_mistral': 1725, 'n_tokens_neox': 1499, 'n_words': 412}