Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hivemind
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
hivemind
Commits
89ac82de
Commit
89ac82de
authored
5 years ago
by
roadscape
Browse files
Options
Downloads
Patches
Plain Diff
add pinned to created sort; filter comments from global trending
parent
3523b5b5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hive/server/bridge_api/cursor.py
+4
-4
4 additions, 4 deletions
hive/server/bridge_api/cursor.py
with
4 additions
and
4 deletions
hive/server/bridge_api/cursor.py
+
4
−
4
View file @
89ac82de
...
@@ -73,7 +73,7 @@ async def pids_by_ranked(db, sort, start_author, start_permlink, limit, tag, obs
...
@@ -73,7 +73,7 @@ async def pids_by_ranked(db, sort, start_author, start_permlink, limit, tag, obs
pids
=
await
pids_by_community
(
db
,
cids
,
sort
,
start_id
,
limit
)
pids
=
await
pids_by_community
(
db
,
cids
,
sort
,
start_id
,
limit
)
# if not filtered by tag, is first page trending: prepend pinned
# if not filtered by tag, is first page trending: prepend pinned
if
not
tag
and
not
start_id
and
sort
==
'
trending
'
:
if
not
tag
and
not
start_id
and
sort
in
(
'
trending
'
,
'
created
'
)
:
prepend
=
await
_pinned
(
db
,
single
or
DEFAULT_CID
)
prepend
=
await
_pinned
(
db
,
single
or
DEFAULT_CID
)
for
pid
in
prepend
:
for
pid
in
prepend
:
if
pid
in
pids
:
if
pid
in
pids
:
...
@@ -147,9 +147,9 @@ async def pids_by_category(db, tag, sort, last_id, limit):
...
@@ -147,9 +147,9 @@ async def pids_by_category(db, tag, sort, last_id, limit):
assert
sort
in
[
'
trending
'
,
'
hot
'
,
'
created
'
,
'
promoted
'
,
assert
sort
in
[
'
trending
'
,
'
hot
'
,
'
created
'
,
'
promoted
'
,
'
payout
'
,
'
payout_comments
'
,
'
muted
'
]
'
payout
'
,
'
payout_comments
'
,
'
muted
'
]
params
=
{
# field pending posts comment promoted
todo
params
=
{
# field pending posts comment promoted
'
trending
'
:
(
'
sc_trend
'
,
True
,
Fals
e
,
False
,
False
),
# depth=0
'
trending
'
:
(
'
sc_trend
'
,
True
,
Tru
e
,
False
,
False
),
'
hot
'
:
(
'
sc_hot
'
,
True
,
Fals
e
,
False
,
False
),
# depth=0
'
hot
'
:
(
'
sc_hot
'
,
True
,
Tru
e
,
False
,
False
),
'
created
'
:
(
'
post_id
'
,
False
,
True
,
False
,
False
),
'
created
'
:
(
'
post_id
'
,
False
,
True
,
False
,
False
),
'
promoted
'
:
(
'
promoted
'
,
True
,
False
,
False
,
True
),
'
promoted
'
:
(
'
promoted
'
,
True
,
False
,
False
,
True
),
'
payout
'
:
(
'
payout
'
,
True
,
False
,
False
,
False
),
'
payout
'
:
(
'
payout
'
,
True
,
False
,
False
,
False
),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment