mirror of
https://github.com/BoostIO/BoostNote-App.git
synced 2026-04-26 21:05:55 +03:00
[GH-ISSUE #440] The app should have a single instance to access db. #209
Labels
No labels
android 🤖
assigned to core 🦹
bug 🐛
documentation 📚
documentation 📚
duplicate 🚫
external issue 🔼
external issue 🔼
feature request 🌟
funded on issuehunt 💵
help wanted 🆘
improvement request 🔨
improvement request 🔨
ios 🍎
mobile 📱
needs investigation 🔬
needs more info ℹ️
needs specs 📐
plugin idea 🔌
plugin idea 🔌
poll 🗳️
pull-request
question ❓
rewarded on issuehunt 🎁
security issue 🔑
won’t fix ❌
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/BoostNote-App#209
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Rokt33r on GitHub (Apr 26, 2020).
Original GitHub issue: https://github.com/BoostIO/BoostNote-App/issues/440
From https://github.com/BoostIO/BoostNote.next/issues/67#issuecomment-568688930
Users can open multiple windows of BoostNote.next app. This behavior is not intended so it could cause several problems because there are no communication measures between the windows.
I'm not sure what kind of problems could happen. But I think it is better to coerce the app to have only one instance(main window) to access db.
@jhdcruz commented on GitHub (Apr 26, 2020):
Is it like the
app.requestSingleInstanceLock()implemented on the old BoostNote app?github.com/BoostIO/Boostnote@3c0f20f364@Rokt33r commented on GitHub (Apr 26, 2020):
@jhdcruz Yes it is. If you want to try it, please check here for more information! https://www.electronjs.org/docs/api/app#event-second-instance
@ZeroX-DG commented on GitHub (May 1, 2020):
To apply fix for the web version, we can implement something simple such as saving a instance counter in localStorage, when user close tab or window, the counter should be updated therefore when a new tab or window load the app, we check the counter first before connecting the app. However, I don't think JS can force tab focus so there are 4 solutions that I think we can use:
@Flexo013 commented on GitHub (May 1, 2020):
The 3rd option has my preference
@Rokt33r commented on GitHub (May 2, 2020):
@ZeroX-DG Good start! I think closing any tabs is too aggressive. Rather than closing the tab, we should just suspend the app.
So I think when a user opens another tab, we should suspend the app in the old screen and show a dialog
@Rokt33r commented on GitHub (Aug 24, 2021):
This issue is not valid anymore since we've discarded the legacy cloud storage from this app. You can open multiple tabs and windows. All data will be synced via WebSocket and server-side events.