fix campey's patch readbility and enrich with comments so it is understandable by first look and so maintainable
This commit is contained in:
		
							parent
							
								
									b70b839155
								
							
						
					
					
						commit
						1f1e5c29c9
					
				
					 1 changed files with 5 additions and 3 deletions
				
			
		|  | @ -561,8 +561,10 @@ class ConversationTextview(gtk.TextView): | ||||||
| 		if gajim.config.get('print_time') == 'always': | 		if gajim.config.get('print_time') == 'always': | ||||||
| 			before_str = gajim.config.get('before_time') | 			before_str = gajim.config.get('before_time') | ||||||
| 			after_str = gajim.config.get('after_time') | 			after_str = gajim.config.get('after_time') | ||||||
| 			# get difference in days since epoch | 			# get difference in days since epoch (86400 = 24*3600) | ||||||
| 			diff_day = int(timegm(time.localtime()))/86400 - int(timegm(tim))/86400 | 			no_of_days_since_epoch = int(timegm(time.localtime())) / 86400 # for GMT time | ||||||
|  | 			no_of_days_snce_epoch_for_msg = int(timegm(tim)) / 86400 # for GMT time | ||||||
|  | 			diff_day = no_of_days_snce_epoch - no_of_days_snce_epoch_for_msg | ||||||
| 			if diff_day == 0: | 			if diff_day == 0: | ||||||
| 				day_str = '' | 				day_str = '' | ||||||
| 			elif diff_day == 1: | 			elif diff_day == 1: | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue