[start page] refactoring

This commit is contained in:
maxkadushkin
2023-01-23 09:59:07 +03:00
parent 86a42427d7
commit e0849da763

View File

@ -209,12 +209,11 @@ window.sdk.on('on_native_message', function(cmd, param) {
console.log(cmd, param);
});
let last_open_file = performance.now();
window.last_click_time = performance.now();
function openFile(from, model) {
if (window.sdk) {
if ( performance.now() - last_open_file < 1000 ) return;
last_open_file = performance.now()
if ( performance.now() - last_click_time < 1000 ) return;
last_click_time = performance.now();
if (from == OPEN_FILE_FOLDER) {
window.sdk.command("open:folder", model);