Skip to content

Commit

Permalink
Added recent files/project list clear on Reset to Default #1232
Browse files Browse the repository at this point in the history
  • Loading branch information
rat-moonshine committed Dec 27, 2023
1 parent 3791afc commit f30841c
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,27 @@ package actionScripts.plugin.recentlyOpened
return UtilsCore.getRecentFilesMenu();
}

override public function resetSettings():void
{
if (cookie.data.hasOwnProperty('recentFiles'))
delete cookie.data['recentFiles'];
if (cookie.data.hasOwnProperty('recentProjects'))
delete cookie.data['recentProjects'];
if (cookie.data.hasOwnProperty('recentProjectsOpenedOption'))
delete cookie.data['recentProjectsOpenedOption'];
if (cookie.data.hasOwnProperty('lastBrowsedLocation'))
delete cookie.data['lastBrowsedLocation'];
cookie.flush();

model.recentlyOpenedFiles = new ArrayCollection();
model.recentlyOpenedProjects = new ArrayCollection();
model.recentlyOpenedProjectOpenedOption = new ArrayCollection();
model.recentSaveProjectPath = new ArrayCollection();

dispatcher.dispatchEvent(new Event(RECENT_PROJECT_LIST_UPDATED));
dispatcher.dispatchEvent(new Event(RECENT_FILES_LIST_UPDATED));
}

private function restoreFromCookie():void
{
// Uncomment & run to delete cookie
Expand Down

0 comments on commit f30841c

Please sign in to comment.