fix: globally pinned items rank in global (#1814)
* fix: globally pinned items rank in global; use query to filter global pinned items * cleanup --------- Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									382714e422
								
							
						
					
					
						commit
						a92215ccf6
					
				@ -536,8 +536,8 @@ export default {
 | 
			
		||||
                    LEFT JOIN "Sub" ON "Sub"."name" = "Item"."subName"
 | 
			
		||||
                    ${joinZapRankPersonalView(me, models)}
 | 
			
		||||
                    ${whereClause(
 | 
			
		||||
                      // in "home" (sub undefined), we want to show pinned items (but without the pin icon)
 | 
			
		||||
                      sub ? '"Item"."pinId" IS NULL' : '',
 | 
			
		||||
                      // in home (sub undefined), filter out global pinned items since we inject them later
 | 
			
		||||
                      sub ? '"Item"."pinId" IS NULL' : 'NOT ("Item"."pinId" IS NOT NULL AND "Item"."subName" IS NULL)',
 | 
			
		||||
                      '"Item"."deletedAt" IS NULL',
 | 
			
		||||
                      '"Item"."parentId" IS NULL',
 | 
			
		||||
                      '"Item".outlawed = false',
 | 
			
		||||
@ -565,8 +565,8 @@ export default {
 | 
			
		||||
                      ${whereClause(
 | 
			
		||||
                        subClause(sub, 3, 'Item', me, showNsfw),
 | 
			
		||||
                        muteClause(me),
 | 
			
		||||
                        // in "home" (sub undefined), we want to show pinned items (but without the pin icon)
 | 
			
		||||
                        sub ? '"Item"."pinId" IS NULL' : '',
 | 
			
		||||
                        // in home (sub undefined), filter out global pinned items since we inject them later
 | 
			
		||||
                        sub ? '"Item"."pinId" IS NULL' : 'NOT ("Item"."pinId" IS NOT NULL AND "Item"."subName" IS NULL)',
 | 
			
		||||
                        '"Item"."deletedAt" IS NULL',
 | 
			
		||||
                        '"Item"."parentId" IS NULL',
 | 
			
		||||
                        '"Item".bio = false',
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user