mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 06:27:02 +03:00
Drop windowResize/windowResizeCallback in favor of ResizeObservable
This commit is contained in:
parent
e192b60d69
commit
7a21694396
14 changed files with 25 additions and 110 deletions
|
|
@ -1,10 +1,6 @@
|
|||
import ko from 'ko';
|
||||
import { KeyState } from 'Common/Enums';
|
||||
|
||||
const $win = jQuery(window);
|
||||
|
||||
export { $win };
|
||||
|
||||
export const $html = jQuery('html');
|
||||
export const $htmlCL = document.documentElement.classList;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import { $win, dropdownVisibility, data as GlobalsData } from 'Common/Globals';
|
||||
import { dropdownVisibility, data as GlobalsData } from 'Common/Globals';
|
||||
import { ComposeType, SaveSettingsStep, FolderType } from 'Common/Enums';
|
||||
import { Mime } from 'Common/Mime';
|
||||
|
||||
|
|
@ -1170,23 +1170,6 @@ export function mailToHelper(mailToUrl, PopupComposeViewModel) {
|
|||
return false;
|
||||
}
|
||||
|
||||
var wr;
|
||||
export const windowResize = timeout => {
|
||||
clearTimeout(wr);
|
||||
if (null == timeout) {
|
||||
$win.trigger('resize');
|
||||
} else {
|
||||
wr = setTimeout(()=>$win.trigger('resize'), timeout);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {void}
|
||||
*/
|
||||
export function windowResizeCallback() {
|
||||
windowResize();
|
||||
}
|
||||
|
||||
let substr = String.substr;
|
||||
if ('b' !== 'ab'.substr(-1)) {
|
||||
substr = (str, start, length) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue