Jump to content

Cannot remove MTTs from Favorites when using multiple devices


FeelsBadMan
  • Priority: No Priority Status: Backlog candidate

This bug has existed since the inception of favorites and has been reported by many people. Basically syncing settings, in particular  "userFavoritesMTTList" from within the settings object, with the server storage is broken, and makes using the favorites feature between multiple devices almost unusable. 

It seems like when you add or remove a favorite MTT or change any setting, the server storage updates with your new preferences perfectly fine.

When your client has settings (with favorites in them) in local storage, which is the case for the desktop and mobile clients, then the client first retrieves the local storage favorites, then it retrieves the server favorites, it detects a discrepancy between server (source) and client (destination) as evidenced by the following log "[CSettings::UpdateMap] source size: 766, destination size: 784",  and then it logs "[CRlxNewTicketAwardService::StartService] Settings synced with the server storage".

Now, what seems to be happening when your local settings get synced with the server storage is that it can only add or modify keys, but it can't remove keys from "userFavoritesMTTList" and probably same for anything else in the settings object so there might be a reason for it, but it breaks favorites. So what happens in the situation presented above, is that despite the server having only 766 favorites, the client will remain with 784. Now let's say the 766 favorites on the server contain 4 new favorites, now your client will be updated to 788 favorites, the 784 originally in local storage + the 4 new ones but it does not remove any of the ones that are no longer in server storage.

In this scenario, as long as you change NOTHING on the client, no favorites, no settings, no table nudges, the server data will still contain the correct 766 and the other device where you have removed the MTTs will continue to be correct with 766. But the moment you change anything to the settings object in your client, including experiencing a table nudge out of your control, both the server and the other device get updated to 788, despite you removing a lot of MTTs on the other device.

The fix is pretty obvious, but idk if it has any other problematic ramifications; when syncing the settings object and the local storage with the server storage, just remove the keys from "userFavoritesMTTList" that are no longer present in the server storage, which seems to work fine when updating the server storage. Alternatively, if removing keys causes other problems, just set the value of the key to false when removing, or true when adding, and only display the favorites that have a value of true. 

You might also ask yourself, why does this psycho have 766 favorited MTTs? Almost all of those are old templates that are impossible to remove as they are not displayed in the client. Surely there will be no issues with an ever expanding settings object with unremovable favorites and table nudges 🤔. It will all probably be fine.  

The Browser client, due to its lack of persistent local storage (or maybe it's just my browser that doesn't store stuff) is the only one that correctly updates from server storage, but obviously it will also experience similar issues when another device updates the server storage. 

  • I have experienced this issue 1

User Feedback

Recommended Comments

There are no comments to display.



Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...