[x] Newly created queries are automatically selected
[x] If the currently selected query is deleted, the last one on the list is selected
[x] If there's only one query and it's deleted, a blank query is created
This PR also changes the map key to Date.getTime(), from Date. This should fix some edge cases where queries created in the same second behave weirdly.
This PR also changes the map key to
Date.getTime()
, fromDate
. This should fix some edge cases where queries created in the same second behave weirdly.