Resumable backup import
This commit is contained in:
parent
3d8aaf0a5a
commit
8ef149e3a8
17 changed files with 498 additions and 33 deletions
|
@ -62,6 +62,8 @@ import { SignalService as Proto } from '../protobuf';
|
|||
import * as log from '../logging/log';
|
||||
import type { StorageAccessType } from '../types/Storage';
|
||||
import { linkDeviceRoute } from '../util/signalRoutes';
|
||||
import { getRelativePath, createName } from '../util/attachmentPath';
|
||||
import { isBackupEnabled } from '../util/isBackupEnabled';
|
||||
|
||||
type StorageKeyByServiceIdKind = {
|
||||
[kind in ServiceIdKind]: keyof StorageAccessType;
|
||||
|
@ -1271,6 +1273,9 @@ export default class AccountManager extends EventTarget {
|
|||
|
||||
const regionCode = getRegionCodeForNumber(number);
|
||||
await storage.put('regionCode', regionCode);
|
||||
if (isBackupEnabled()) {
|
||||
await storage.put('backupDownloadPath', getRelativePath(createName()));
|
||||
}
|
||||
await storage.protocol.hydrateCaches();
|
||||
|
||||
const store = storage.protocol;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue