Fix various type definitions
This commit is contained in:
parent
4cf6b7174b
commit
648c3c7796
6 changed files with 9 additions and 6 deletions
|
@ -18,13 +18,14 @@ import SettingController from "./SettingController";
|
|||
import dis from "../../dispatcher/dispatcher";
|
||||
import { UpdateFontSizePayload } from "../../dispatcher/payloads/UpdateFontSizePayload";
|
||||
import { Action } from "../../dispatcher/actions";
|
||||
import { SettingLevel } from "../SettingLevel";
|
||||
|
||||
export default class FontSizeController extends SettingController {
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
onChange(level, roomId, newValue) {
|
||||
public onChange(level: SettingLevel, roomId: string, newValue: any) {
|
||||
// Dispatch font size change so that everything open responds to the change.
|
||||
dis.dispatch<UpdateFontSizePayload>({
|
||||
action: Action.UpdateFontSize,
|
||||
|
|
|
@ -61,7 +61,7 @@ export class NotificationsEnabledController extends SettingController {
|
|||
return calculatedValue;
|
||||
}
|
||||
|
||||
public onChange(level: SettingLevel, roomId: string, newValue) {
|
||||
public onChange(level: SettingLevel, roomId: string, newValue: any) {
|
||||
if (getNotifier().supportsDesktopNotifications()) {
|
||||
getNotifier().setEnabled(newValue);
|
||||
}
|
||||
|
|
|
@ -19,13 +19,14 @@ import SettingsStore from "../SettingsStore";
|
|||
import dis from "../../dispatcher/dispatcher";
|
||||
import { UpdateSystemFontPayload } from "../../dispatcher/payloads/UpdateSystemFontPayload";
|
||||
import { Action } from "../../dispatcher/actions";
|
||||
import { SettingLevel } from "../SettingLevel";
|
||||
|
||||
export default class SystemFontController extends SettingController {
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
public onChange(level, roomId, newValue) {
|
||||
public onChange(level: SettingLevel, roomId: string, newValue: any) {
|
||||
// Dispatch font size change so that everything open responds to the change.
|
||||
dis.dispatch<UpdateSystemFontPayload>({
|
||||
action: Action.UpdateSystemFont,
|
||||
|
|
|
@ -19,13 +19,14 @@ import SettingsStore from "../SettingsStore";
|
|||
import dis from "../../dispatcher/dispatcher";
|
||||
import { UpdateSystemFontPayload } from "../../dispatcher/payloads/UpdateSystemFontPayload";
|
||||
import { Action } from "../../dispatcher/actions";
|
||||
import { SettingLevel } from "../SettingLevel";
|
||||
|
||||
export default class UseSystemFontController extends SettingController {
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
public onChange(level, roomId, newValue) {
|
||||
public onChange(level: SettingLevel, roomId: string, newValue: any) {
|
||||
// Dispatch font size change so that everything open responds to the change.
|
||||
dis.dispatch<UpdateSystemFontPayload>({
|
||||
action: Action.UpdateSystemFont,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue