Improve display of muted profiles

This commit is contained in:
SondreB 2023-02-03 08:36:26 +01:00
parent 3e4272b033
commit be2bc6486d
No known key found for this signature in database
GPG Key ID: D6CC44C75005FDBF
2 changed files with 6 additions and 3 deletions

View File

@ -252,9 +252,12 @@ export class ProfileService {
const index = this.following.findIndex((f) => f.pubkey == profile.pubkey);
if (profile.circle != null) {
if (index == -1) {
if (profile.status == 1 && index == -1) {
this.following.push(profile);
this.#updated();
} else if (profile.status == 2 && index > -1) {
this.following.splice(index, 1);
this.#updated();
} else {
this.following[index] = profile;
this.#updated();

View File

@ -3,8 +3,8 @@
<div class="event-header">
<div class="icon">
<a [routerLink]="['/p', pubkey]">
<img onerror="this.src='/assets/profile.png'" *ngIf="profile?.status == 1" class="profile-image-follow" [matTooltip]="tooltip" [style.borderColor]="circle?.color" matTooltipPosition="above" [src]="imagePath" />
<img onerror="this.src='/assets/profile.png'" *ngIf="profile?.status != 1" class="profile-image" matTooltipPosition="above" [src]="imagePath" />
<img onerror="this.src='/assets/profile.png'" *ngIf="profile?.status == 1 || profile?.status == 2" class="profile-image-follow" [matTooltip]="tooltip" [style.borderColor]="circle?.color" matTooltipPosition="above" [src]="imagePath" />
<img onerror="this.src='/assets/profile.png'" *ngIf="profile?.status != 1 && profile?.status != 2" class="profile-image" matTooltipPosition="above" [src]="imagePath" />
<!-- <app-profile-image [publicKey]="event.pubkey"></app-profile-image> -->
</a>
</div>