mirror of https://github.com/pixelfed/pixelfed.git
Merge pull request #4656 from pixelfed/staging
Update NotificationService, fix order bug
This commit is contained in:
commit
5a9a159708
|
@ -58,6 +58,7 @@ class NotificationService {
|
||||||
$stop = $stop > 400 ? 400 : $stop;
|
$stop = $stop > 400 ? 400 : $stop;
|
||||||
$ids = Notification::where('id', '>', self::getEpochId())
|
$ids = Notification::where('id', '>', self::getEpochId())
|
||||||
->where('profile_id', $id)
|
->where('profile_id', $id)
|
||||||
|
->orderByDesc('id')
|
||||||
->skip($start)
|
->skip($start)
|
||||||
->take($stop)
|
->take($stop)
|
||||||
->pluck('id');
|
->pluck('id');
|
||||||
|
@ -281,6 +282,7 @@ class NotificationService {
|
||||||
if(self::count($id) == 0 || $force == true) {
|
if(self::count($id) == 0 || $force == true) {
|
||||||
$ids = Notification::where('profile_id', $id)
|
$ids = Notification::where('profile_id', $id)
|
||||||
->where('id', '>', self::getEpochId())
|
->where('id', '>', self::getEpochId())
|
||||||
|
->orderByDesc('id')
|
||||||
->limit($stop)
|
->limit($stop)
|
||||||
->pluck('id');
|
->pluck('id');
|
||||||
foreach($ids as $key) {
|
foreach($ids as $key) {
|
||||||
|
|
Loading…
Reference in New Issue