Fixed the bug I was suppose to fix

This commit is contained in:
SondreB 2023-01-31 16:14:13 +01:00
parent d622f27095
commit 3d9bdddf31
No known key found for this signature in database
GPG Key ID: D6CC44C75005FDBF

View File

@ -243,8 +243,6 @@ export class ProfileService {
this.cache.set(profile.pubkey, profile);
await this.db.storage.putProfile(profile);
this.#putFollowingProfile(profile);
this.updateItemIfSelected(profile);
}
@ -287,7 +285,6 @@ export class ProfileService {
}
#putFollowingProfile(profile: NostrProfileDocument) {
debugger;
const existingIndex = this.following.findIndex((p) => p.pubkey == profile.pubkey);
if (existingIndex === -1) {
@ -319,7 +316,7 @@ export class ProfileService {
// Save directly, don't put in cache.
await this.db.storage.putProfile(existingProfile);
// this.#putFollowingProfile(existingProfile);
this.#putFollowingProfile(existingProfile);
// Queue up to get this profile.
this.queueService.enqueProfile(existingProfile.pubkey);