v0.9.0: the history lives in ~/Documents/bubble-data
On its first launch bubble copies ~/Documents/voipms-desktop-data to ~/Documents/bubble-data (through a .partial folder, renamed only once the copy is whole) and uses that. The old folder stays as a backup with a "MOVED TO bubble-data.txt" note, to delete once everything looks right. A data folder chosen in Settings elsewhere stays put; if the copy fails, bubble keeps using the old folder rather than starting empty. Tried with a throwaway home holding the sandbox's made-up history: the copy, the note, the chats loading from the new folder, no second copy on the next launch, and a saved pointer to the old folder moving along with it.
This commit is contained in:
+2
-1
@@ -16,7 +16,7 @@ import { MediaStore } from './media'
|
||||
import { exportHtml, exportText, inRange, rangeLabel } from './export'
|
||||
import { extFor, guessMime } from '@shared/mime'
|
||||
import { clearCredentials, loadCredentials, saveCredentials } from './secrets'
|
||||
import { getDataDir, loadSettings, saveSettings, setDataDir } from './settings'
|
||||
import { getDataDir, loadSettings, moveToBubbleData, saveSettings, setDataDir } from './settings'
|
||||
import { SyncEngine } from './sync'
|
||||
import { loadZoom, saveZoom } from './uistate'
|
||||
import { sendWithRetry } from './send'
|
||||
@@ -798,6 +798,7 @@ app.on('second-instance', () => {
|
||||
})
|
||||
|
||||
app.whenReady().then(async () => {
|
||||
moveToBubbleData()
|
||||
settings = loadSettings()
|
||||
db = new MessageDb(path.join(getDataDir(), 'messages.db'))
|
||||
if (SANDBOX) seedDemo(db)
|
||||
|
||||
Reference in New Issue
Block a user