mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-12-23 02:26:36 +00:00
Merge pull request 'Move local feed before federated feed for non-logged-in users' (#1072) from timeline-order into main
Reviewed-on: https://git.joinplu.me/Plume/Plume/pulls/1072
This commit is contained in:
commit
d95549f58b
1 changed files with 10 additions and 10 deletions
|
@ -86,16 +86,6 @@ impl Timeline {
|
|||
.or(timeline_definition::user_id.is_null()),
|
||||
)
|
||||
.load::<Self>(conn)
|
||||
.map(|mut timelines| {
|
||||
timelines.sort_by(|t1, t2| {
|
||||
if t1.user_id.is_some() && t2.user_id.is_none() {
|
||||
Ordering::Less
|
||||
} else {
|
||||
t1.id.cmp(&t2.id)
|
||||
}
|
||||
});
|
||||
timelines
|
||||
})
|
||||
.map_err(Error::from)
|
||||
} else {
|
||||
timeline_definition::table
|
||||
|
@ -103,6 +93,16 @@ impl Timeline {
|
|||
.load::<Self>(conn)
|
||||
.map_err(Error::from)
|
||||
}
|
||||
.map(|mut timelines| {
|
||||
timelines.sort_by(|t1, t2| {
|
||||
if t1.user_id.is_some() && t2.user_id.is_none() {
|
||||
Ordering::Less
|
||||
} else {
|
||||
t1.id.cmp(&t2.id)
|
||||
}
|
||||
});
|
||||
timelines
|
||||
})
|
||||
}
|
||||
|
||||
pub fn new_for_user(
|
||||
|
|
Loading…
Reference in a new issue