Item may be opened in the wrong tab

Issue #50 resolved
零欸特 created an issue

https://bitbucket.org/pabuisson/in-my-pocket/src/6206b857953b5e744561492f2a212690ef01435f/src/modules/items.js#lines-473
The item is opened to the active tab after reading the entire database from the storage. When the storage is slow, it may open to the wrong tab.

I often open a new tab (Ctrl + T) and load a random item (Alt + R) then switch to another tab/window to continue my work. Suddenly, my working progress get replaced with the pocket article and the progress is lost.

Ideally, it should record the current active tab when the command is invoked so it won't blindly replace the current active tab.

in-my-pocket 0.12.1