From 2fca0ee989f9b894c9f45a793c77ef3c2a27d399 Mon Sep 17 00:00:00 2001 From: hius07 <62179190+hius07@users.noreply.github.com> Date: Sat, 24 Feb 2024 09:24:50 +0200 Subject: [PATCH] Reader: use existing module instances on start (#11485) --- reader.lua | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/reader.lua b/reader.lua index 47b7ed969..d4769f5b0 100755 --- a/reader.lua +++ b/reader.lua @@ -271,20 +271,11 @@ else -- Always open FM modules on top of filemanager, so closing 'em doesn't result in an exit -- because of an empty widget stack, and so they can interact with the FM instance as expected. if start_with == "history" then - local FileManagerHistory = require("apps/filemanager/filemanagerhistory") - FileManagerHistory:new{ - ui = FileManager.instance, - }:onShowHist() + FileManager.instance.history:onShowHist() elseif start_with == "favorites" then - local FileManagerCollection = require("apps/filemanager/filemanagercollection") - FileManagerCollection:new{ - ui = FileManager.instance, - }:onShowColl("favorites") + FileManager.instance.collections:onShowColl() elseif start_with == "folder_shortcuts" then - local FileManagerShortcuts = require("apps/filemanager/filemanagershortcuts") - FileManagerShortcuts:new{ - ui = FileManager.instance, - }:onShowFolderShortcutsDialog() + FileManager.instance.folder_shortcuts:onShowFolderShortcutsDialog() end exit_code = UIManager:run() end