Auto save when menu is shown - crossword.koplugin - Unnamed repository; edit this file 'description' to name the repository.
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Submodules
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 1165a742ef81e4a19b93e9d7873ca67135aeff50
 (DIR) parent 651d9cf6df2523425a80c66e40b7fcf293dc1e5d
 (HTM) Author: Scarlett <social@scarlettmcallister.com>
       Date:   Sun,  7 May 2023 11:27:52 -0300
       
       Auto save when menu is shown
       
       Diffstat:
         M gameview.lua                        |       8 ++++----
       
       1 file changed, 4 insertions(+), 4 deletions(-)
       ---
 (DIR) diff --git a/gameview.lua b/gameview.lua
       @@ -223,6 +223,7 @@ function GameView:onSwipe(arg, ges_ev)
           local direction = BD.flipDirectionIfMirroredUILayout(ges_ev.direction)
           if direction == "south" then
              -- See readerhighlight.lua for more ideas about how to use ButtonDialog.
       +      self.puzzle:save()
              self:showGameMenu()
           elseif direction == "east" then
              self:leftChar()
       @@ -291,16 +292,15 @@ function GameView:showGameMenu()
                 },
                 {
                    {
       -               text = _("Save"),
       +               text = _("Saved!"),
       +               enabled = false,
                       callback = function()
       -                  self.puzzle:save()
       -                  UIManager:close(game_dialog)
       +                   -- Nothing to show
                       end,
                    },
                    {
                       text = _("Exit"),
                       callback = function()
       -                  self.puzzle:save()
                          UIManager:close(game_dialog)
                          UIManager:close(game_view)
                       end,