mirror of https://github.com/vector-im/riot-web
Fix incorrect call to setValue
parent
54a65441a5
commit
8d5965c33c
|
@ -15,7 +15,7 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import dis from './dispatcher';
|
import dis from './dispatcher';
|
||||||
import SettingsStore from './settings/SettingsStore';
|
import SettingsStore, {SettingLevel} from './settings/SettingsStore';
|
||||||
|
|
||||||
export class FontWatcher {
|
export class FontWatcher {
|
||||||
constructor(minSize, maxSize) {
|
constructor(minSize, maxSize) {
|
||||||
|
@ -43,7 +43,7 @@ export class FontWatcher {
|
||||||
let fontSize = this._min_size < size ? size : this._min_size;
|
let fontSize = this._min_size < size ? size : this._min_size;
|
||||||
fontSize = fontSize < this._max_size ? fontSize : this._max_size;
|
fontSize = fontSize < this._max_size ? fontSize : this._max_size;
|
||||||
if (fontSize != size) {
|
if (fontSize != size) {
|
||||||
SettingsStore.setValue("font_size", null, fontSize);
|
SettingsStore.setValue("font_size", null, SettingLevel.Device, fontSize);
|
||||||
}
|
}
|
||||||
document.querySelector(":root").style.fontSize = fontSize + "px";
|
document.querySelector(":root").style.fontSize = fontSize + "px";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue