mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 04:52:24 -05:00 
			
		
		
		
	finish writing code comments
This commit is contained in:
		
					parent
					
						
							
								a526541050
							
						
					
				
			
			
				commit
				
					
						2509cb83b7
					
				
			
		
					 5 changed files with 14 additions and 4 deletions
				
			
		|  | @ -28,7 +28,8 @@ import ( | ||||||
| 	"github.com/superseriousbusiness/gotosocial/internal/paging" | 	"github.com/superseriousbusiness/gotosocial/internal/paging" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| // HomeTimelineGet ... | // HomeTimelineGet gets a pageable timeline of statuses | ||||||
|  | // in the home timeline of the requesting account. | ||||||
| func (p *Processor) HomeTimelineGet( | func (p *Processor) HomeTimelineGet( | ||||||
| 	ctx context.Context, | 	ctx context.Context, | ||||||
| 	requester *gtsmodel.Account, | 	requester *gtsmodel.Account, | ||||||
|  |  | ||||||
|  | @ -30,7 +30,8 @@ import ( | ||||||
| 	"github.com/superseriousbusiness/gotosocial/internal/paging" | 	"github.com/superseriousbusiness/gotosocial/internal/paging" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| // ListTimelineGet ... | // ListTimelineGet gets a pageable timeline of statuses | ||||||
|  | // in the list timeline of ID by the requesting account. | ||||||
| func (p *Processor) ListTimelineGet( | func (p *Processor) ListTimelineGet( | ||||||
| 	ctx context.Context, | 	ctx context.Context, | ||||||
| 	requester *gtsmodel.Account, | 	requester *gtsmodel.Account, | ||||||
|  |  | ||||||
|  | @ -27,7 +27,11 @@ import ( | ||||||
| 	"github.com/superseriousbusiness/gotosocial/internal/paging" | 	"github.com/superseriousbusiness/gotosocial/internal/paging" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| // PublicTimelineGet ... | // PublicTimelineGet gets a pageable timeline of public statuses | ||||||
|  | // for the given requesting account. It ensures that each status | ||||||
|  | // in timeline is visible to the account before returning it. | ||||||
|  | // | ||||||
|  | // The local argument limits this to local-only statuses. | ||||||
| func (p *Processor) PublicTimelineGet( | func (p *Processor) PublicTimelineGet( | ||||||
| 	ctx context.Context, | 	ctx context.Context, | ||||||
| 	requester *gtsmodel.Account, | 	requester *gtsmodel.Account, | ||||||
|  |  | ||||||
|  | @ -66,7 +66,8 @@ func (p *Processor) TagTimelineGet( | ||||||
| 		// account. | 		// account. | ||||||
| 		requester, | 		requester, | ||||||
| 
 | 
 | ||||||
| 		// No cache. | 		// No | ||||||
|  | 		// cache. | ||||||
| 		nil, | 		nil, | ||||||
| 
 | 
 | ||||||
| 		// Current | 		// Current | ||||||
|  |  | ||||||
|  | @ -110,6 +110,9 @@ func (p *Processor) getStatusTimeline( | ||||||
| 
 | 
 | ||||||
| 	// Load status page via timeline cache, also | 	// Load status page via timeline cache, also | ||||||
| 	// getting lo, hi values for next, prev pages. | 	// getting lo, hi values for next, prev pages. | ||||||
|  | 	// | ||||||
|  | 	// NOTE: this safely handles the case of a nil | ||||||
|  | 	// input timeline, i.e. uncached timeline type. | ||||||
| 	apiStatuses, lo, hi, err := timeline.Load(ctx, | 	apiStatuses, lo, hi, err := timeline.Load(ctx, | ||||||
| 
 | 
 | ||||||
| 		// Status page | 		// Status page | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue