Appease the linters
This commit is contained in:
parent
04d1f5dd28
commit
6227d3c183
5 changed files with 11 additions and 13 deletions
|
@ -155,7 +155,7 @@ export class WidgetLayoutStore extends ReadyWatchingStore {
|
|||
if (room) this.recalculateRoom(room);
|
||||
};
|
||||
|
||||
private updateFromSettings = (settingName: string, roomId: string, /* and other stuff */) => {
|
||||
private updateFromSettings = (settingName: string, roomId: string /* and other stuff */) => {
|
||||
if (roomId) {
|
||||
const room = this.matrixClient.getRoom(roomId);
|
||||
if (room) this.recalculateRoom(room);
|
||||
|
@ -266,10 +266,6 @@ export class WidgetLayoutStore extends ReadyWatchingStore {
|
|||
maxHeight = Math.max(maxHeight, clamp(h, MIN_WIDGET_HEIGHT_PCT, 100));
|
||||
}
|
||||
}
|
||||
let remainingWidth = 100;
|
||||
for (const width of widths) {
|
||||
remainingWidth -= width;
|
||||
}
|
||||
if (doAutobalance) {
|
||||
for (let i = 0; i < widths.length; i++) {
|
||||
widths[i] = 100 / widths.length;
|
||||
|
@ -406,7 +402,9 @@ export class WidgetLayoutStore extends ReadyWatchingStore {
|
|||
public moveToContainer(room: Room, widget: IApp, toContainer: Container) {
|
||||
const allWidgets = this.getAllWidgets(room);
|
||||
if (!allWidgets.some(([w])=> w.id === widget.id)) return; // invalid
|
||||
this.updateUserLayout(room, {[widget.id]:{container: toContainer}});
|
||||
this.updateUserLayout(room, {
|
||||
[widget.id]: {container: toContainer},
|
||||
});
|
||||
}
|
||||
|
||||
public canCopyLayoutToRoom(room: Room): boolean {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue