mirror of
https://github.com/block-core/blockcore-notes.git
synced 2024-09-28 22:10:42 +00:00
Fix the sort order for private feed
This commit is contained in:
parent
7a97afc98d
commit
737c450e0c
@ -230,8 +230,6 @@ export class AppComponent {
|
||||
return;
|
||||
}
|
||||
|
||||
debugger;
|
||||
|
||||
// Sometimes we might discover newer or older profiles, make sure we only update UI dialog if newer.
|
||||
if (this.discoveredProfileDate < data.created_at) {
|
||||
this.discoveredProfileDate = data.created_at;
|
||||
|
@ -32,15 +32,7 @@ export class FeedPrivateComponent {
|
||||
pageSize = 12;
|
||||
currentItems: NostrEventDocument[] = [];
|
||||
|
||||
currentItems$ = dexieToRx(liveQuery(() => this.table.offset(this.offset).limit(this.pageSize).toArray())).pipe(
|
||||
map((data) => {
|
||||
data.sort((a, b) => {
|
||||
return a.created_at < b.created_at ? 1 : -1;
|
||||
});
|
||||
|
||||
return data;
|
||||
})
|
||||
);
|
||||
currentItems$ = dexieToRx(liveQuery(() => this.table.orderBy('created_at').offset(this.offset).limit(this.pageSize).toArray()));
|
||||
|
||||
items$ = dexieToRx(liveQuery(() => this.items())).pipe(
|
||||
map((data) => {
|
||||
|
Loading…
Reference in New Issue
Block a user