ENH: Click RecentFile once in second

JIRA: none
Change-Id: I1e35b42223b3af9529556259d8584c16e5386a93
This commit is contained in:
zorro.zhang 2025-04-08 19:48:25 +08:00 committed by Lane.Wei
parent 2fa2bb24b3
commit fda63da85d
1 changed files with 16 additions and 7 deletions

View File

@ -431,18 +431,27 @@ function OnClickOpenProject()
SendWXMessage( JSON.stringify(tSend) ); SendWXMessage( JSON.stringify(tSend) );
} }
let RecentClick=true;
function OnOpenRecentFile( strPath ) function OnOpenRecentFile( strPath )
{ {
if( RecentPage_Mode!=Recent_Normal ) if( RecentPage_Mode!=Recent_Normal )
return; return;
var tSend={}; if(RecentClick)
tSend['sequence_id']=Math.round(new Date() / 1000); {
tSend['command']="homepage_open_recentfile"; RecentClick = false;
tSend['data']={}; setTimeout(() => {
tSend['data']['path']=decodeURI(strPath); RecentClick = true;
}, 1000);
SendWXMessage( JSON.stringify(tSend) ); var tSend={};
tSend['sequence_id']=Math.round(new Date() / 1000);
tSend['command']="homepage_open_recentfile";
tSend['data']={};
tSend['data']['path']=decodeURI(strPath);
SendWXMessage( JSON.stringify(tSend) );
}
} }
function OnDeleteRecentFile( ) function OnDeleteRecentFile( )