MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    resume()

    Scheduled Pinned Locked Moved Development
    12 Posts 4 Posters 6.4k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Offline
      Anhalter42
      last edited by

      In the documentation it is stated: When a module will be shown after it was previously hidden (using the module.show() method), the resume() method will be called.

      For me “after it was previously hidden” means, that resume() should only get called when the module was hidden/not visible before and now changes its status to visible. I’ve tried this and it looks like the resume() method gets called even when the module was visible before. I’ve seen this behaviour while using the MMM-ProfileSwitcher. Switching between profiles that contain the same module (among others) triggers resume() on this module.

      (After quickly looking through the code, I’m pretty sure MMM-ProfileSwitcher uses standard .show() and .hide(), so it should be generalizable. If necessary, I can try to make a small minimal example.)

      johnnyboyJ 1 Reply Last reply Reply Quote 0
      • johnnyboyJ Offline
        johnnyboy @Anhalter42
        last edited by

        This post is deleted!
        1 Reply Last reply Reply Quote 0
        • cowboysdudeC Offline
          cowboysdude Module Developer
          last edited by cowboysdude

          So what would you suggest to fix it? I mean you know being free software and all that many people spend a lot of time improving…for free.

          johnnyboyJ 1 Reply Last reply Reply Quote 2
          • johnnyboyJ Offline
            johnnyboy @cowboysdude
            last edited by

            This post is deleted!
            cowboysdudeC 1 Reply Last reply Reply Quote 0
            • cowboysdudeC Offline
              cowboysdude Module Developer @johnnyboy
              last edited by cowboysdude

              @johnnyboy No you haven’t offended me. Not jumping on anyone… I’m just a very direct person and I tend to say what I mean.

              So don’t be offended I’m just simply asking you or anyone else what do you suggest gets done?

              johnnyboyJ 1 Reply Last reply Reply Quote 1
              • johnnyboyJ Offline
                johnnyboy @cowboysdude
                last edited by

                This post is deleted!
                cowboysdudeC 1 Reply Last reply Reply Quote 0
                • cowboysdudeC Offline
                  cowboysdude Module Developer @johnnyboy
                  last edited by

                  @johnnyboy I would rather have suggestions to fix it rather then agree… that should have taken up on the https://github.com/MichMich/MagicMirror site…

                  johnnyboyJ 1 Reply Last reply Reply Quote 1
                  • johnnyboyJ Offline
                    johnnyboy @cowboysdude
                    last edited by

                    This post is deleted!
                    cowboysdudeC 1 Reply Last reply Reply Quote 0
                    • cowboysdudeC Offline
                      cowboysdude Module Developer @johnnyboy
                      last edited by

                      @johnnyboy Good, if it helps I’m all for it :)

                      johnnyboyJ 1 Reply Last reply Reply Quote 2
                      • johnnyboyJ Offline
                        johnnyboy @cowboysdude
                        last edited by

                        This post is deleted!
                        1 Reply Last reply Reply Quote 1
                        • A Offline
                          Anhalter42
                          last edited by

                          No intention to complain here, so no reason to argue about that.

                          IMO, the two most obvious solutions are

                          1. changing the behaviour, i.e. implement a check whether the module was visible before the call
                          2. changing the description in the documentation so that it matches the behaviour

                          The question is, how do you solve something like this here? Who decides which solution should be preferred and how do I trigger a fix (I dont want to dive into the main core code myself). Do you usually open an issue on github in such cases? Also, the author of this peace of code may have relevant information, but (as usual in open-source projects) its nearly impossible to find out who to contact…

                          brobergB 1 Reply Last reply Reply Quote 0
                          • brobergB Offline
                            broberg Project Sponsor @Anhalter42
                            last edited by

                            @Anhalter42 Yes, open an issue on github or if you already have made changes to either the documentation or written code that does your first suggestion then you would suggest a Pull Request to implement the changes you’ve made

                            1 Reply Last reply Reply Quote 0

                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                            With your input, this post could be even better 💗

                            Register Login
                            • 1 / 1
                            • First post
                              Last post
                            Enjoying MagicMirror? Please consider a donation!
                            MagicMirror created by Michael Teeuw.
                            Forum managed by Sam, technical setup by Karsten.
                            This forum is using NodeBB as its core | Contributors
                            Contact | Privacy Policy