Conversation
I find it hard to go through the list of OTPs to find the one I am after. I added a line of code to sort them alphabitically be name.
|
Hello, I cloned and merged locally but this sort feature doesn't seem to be working for me on a desktop not phone. Listed OTP's are unsorted. The other static header commit works great. What I did was apply your patch and reload the page in the browser. I also confirmed that the patch was there with a view-source. Thank you. |
|
@bonifacio123 It doesn't work on fetching the accounts object. It works on building it. Getting the sort function to work on fetching the accounts object would unnecessarily run additional functions on page load. Instead, the sort function runs everytime a new key is added and stores a sorted object to be fetched (load-free) on page load. When a new key is added, it sorts the object and adds the new key where it belongs in the object. At the moment, it simply appends new keys to the end of the object. Try to add any random key and your keys will get sorted. you only do that once because you've already got keys stored in your localStorage before the update. For anyone installing Gauth for the first time they would have the keys sorted by default. |
|
Works as you described. Thank you |
I find it hard to go through the list of OTPs to find the one I am after. I added a few lines of code to sort them alphabitically by name.