Fix minor lint concerns

Closes https://github.com/turt2live/matrix-dimension/pull/369
This commit is contained in:
Travis Ralston 2020-12-28 20:31:34 -07:00
parent c79cd46f49
commit 290136ff99
2 changed files with 5 additions and 4 deletions

View file

@ -52,9 +52,9 @@
</span>
<ui-switch [checked]="pack.isEnabled" size="small" [disabled]="isUpdating"
(change)="toggleEnabled(pack)"></ui-switch>
<span *ngIf="!pack.isEnabled && !isUpdating" class="removeButton" title="remove stickerpack" (click)="removePack(pack)">
<i class="fa fa-trash"></i>
</span>
<span *ngIf="!pack.isEnabled && !isUpdating" class="removeButton" title="remove stickerpack" (click)="removePack(pack)">
<i class="fa fa-trash"></i>
</span>
</td>
</tr>
</tbody>

View file

@ -72,11 +72,12 @@ export class AdminStickerPacksComponent implements OnInit {
public removePack(pack: FE_StickerPack) {
this.isUpdating = true;
this.adminStickers.removePack(pack.id).then(() => {
for (let i = 0; i < this.packs.length; ++i)
for (let i = 0; i < this.packs.length; ++i) {
if (this.packs[i].id === pack.id) {
this.packs.splice(i, 1);
break;
}
}
this.isUpdating = false;
this.toaster.pop("success", "Sticker pack removed");
}).catch(err => {