Fix minor lint concerns
Closes https://github.com/turt2live/matrix-dimension/pull/369
This commit is contained in:
parent
c79cd46f49
commit
290136ff99
|
@ -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>
|
||||
|
|
|
@ -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 => {
|
||||
|
|
Loading…
Reference in a new issue