MMM-page-indicator icon indicating copy to clipboard operation
MMM-page-indicator copied to clipboard

Indicator loses order

Open fnsign opened this issue 2 years ago • 12 comments

Hi, I use MMM-pages together with MMM-page-indicator. For changing the pages i use MMM-GroveGesture. MMM-GroveGestures allows me to swipe pages forth and back. The gestures are detected by a small gesture sensor which is also used by the module author (https://github.com/eouia/MMM-GroveGestures). All 3 modules worked fine together. Around the release of MM v2.14 (I can't say for sure) the indcator gest out of sync with the order of the displayed pages.

E.g.: When MM is started or wakes up from sleep, the indicator is on the first position and displays page0 (which is correct). When I swipe to the next page (page1), then page1 is displayed, but the indicator overjumps the second position and displays the 3rd (which would be page2). The further I swipe the more confused gets the indicator and shows always the wrong position. When the mirror goes to sleep and wakes up gain, then the indicator is again on the 1st position and the home page (page0) is displayed. As said before the combo worked flawlessly together, but somehow it changed.

fnsign avatar Aug 25 '21 12:08 fnsign

Just as a sanity check, are you using an up-to-date version? There was a bug a while ago that was fixed and also caused loss of order.

edward-shen avatar Aug 25 '21 19:08 edward-shen

Yes, I use the latest version.

fnsign avatar Aug 25 '21 20:08 fnsign

Alright, thanks for confirming. Can you post the chrome devtool console logs? I'm wondering if it's receiving multiple page change events.

edward-shen avatar Aug 25 '21 20:08 edward-shen

Unfortunatelly I just can access the mirror via VNC. Thus I made a screen shot of the console. There seems to be a double event, as you guessed: Bildschirmfoto 2021-08-25 um 23 01 57

fnsign avatar Aug 25 '21 21:08 fnsign

Interesting. I've made a quick push to MMM-page-indicator to have more descriptive logging. Can you try what you're doing again, after pulling?

edward-shen avatar Aug 26 '21 00:08 edward-shen

Here is the screenshot with more descriptive logging, filtered on MMM-page-indicator: Bildschirmfoto 2021-08-26 um 08 10 44

fnsign avatar Aug 26 '21 06:08 fnsign

Thanks. It's a little strange to see this happen only with you. Do you mind uploading your entire config.js, with any personal information removed?

I suspect that you're declaring MMM-page-indicator first and that's why it's causing this issue, but this shouldn't happen even if you did.

edward-shen avatar Aug 26 '21 16:08 edward-shen

Here is my config.js file. The MMM-page-indicator is on the very end of the config. I put it also for testing right after MMM-pages, but it still didn't work.

config.txt

fnsign avatar Aug 26 '21 17:08 fnsign

Thanks.

I'll try my best to take a look at this soon, but as I'm moving starting tomorrow it might take a while to get back to you.

If you want to try a quick fix you can remove these lines from the code and it should work—let me know if it does.

I'll need to figure out a way to do this without breaking compatibility for everyone though.

edward-shen avatar Aug 26 '21 18:08 edward-shen

Hi, thanks for the quick fix! It does work! It is actually interesting, because you delete the query for the increment/decrement, notification which is sent from the gesture sensor module and it now works correctly...Anyways, thanks for your support, and I hope you can figure out how to fix that without breaking compatibility.

fnsign avatar Aug 26 '21 20:08 fnsign

Hi Edward, just fyi I have the exact same issue on mine.

Burnallover avatar Sep 20 '21 11:09 Burnallover

@edward-shen Today i upgraded my MagicMirror install to 2.17 and had the same issue. Deleting/uncomment the lines you suggested works for me. Regards AxLED

Ax-LED avatar Oct 16 '21 18:10 Ax-LED