hius07

Results 641 comments of hius07

(1) You can have in, for example, `ReaderFooter:init()` ```Lua self.preset = { presets = G_reader_settings:readSetting("footer_presets", {}), action_name = "load_footer_preset", menu_text = _("Create new preset from current settings"), } ``` Then...

> Not sure about the 2nd part Currently the module itself is passed as arg to Presets (because Presets needs some module's methods). You agree that the presets table should...

Yes, it can be, for example, in `ReaderFooter:init()`: ```Lua self.preset = { presets = G_reader_settings:readSetting("footer_presets", {}), action_name = "load_footer_preset", menu_text = _("Create new preset from current settings"), build_func = ,...

**(1)** Do not pass methods, let them belong to the object (object, not config): ```Lua self.preset_object = { presets = G_reader_settings:readSetting("dict_presets", {}), dispatcher_name = "load_dictionary_preset", cycle_index = G_reader_settings:readSetting("dict_presets_cycle_index"), saveCycleIndex =...

> we should pass an object with all the things that the preset modules needs to call in that object ? This.

I propose `preset_object` in (1) of my https://github.com/koreader/koreader/pull/13774#issuecomment-2969999927. It is the only arg to be passed to the Presets module methods.

> Can I get a straight answer, yes or no ? Bad example. `ReaderDictionary:createPresetFromCurrentSettings` should be deleted.

**(1)** About naming I think `preset_config` is not good. _Object is a unit that combines data (attributes or properties) and the functions (methods) that operate on that data._ **(2)** About...

Can it be done in MovableContainer to apply to all movable widgets?

If unneeded, the InfoMessage i icon can be removed by `show_icon = false`.