decord/source/modules/app_database/modules/LowDiskTrim.tsx
2026-08-03 11:20:01 +00:00

58 lines
1.6 KiB
TypeScript

// Module ID: 7024
// Function ID: 7025
// Name: handlePostConnectionOpen
// Dependencies: [6835, 1907, 2]
// Module 7024 (handlePostConnectionOpen)
import importDefaultResult from "result";
let obj = importDefault;
class LowDiskTrim {
constructor() {
obj = Object.create(new.target.prototype);
LowDiskTrim = obj;
obj.isLowDisk = false;
obj.actions = {
POST_CONNECTION_OPEN() {
return obj.handlePostConnectionOpen();
}
};
addChangeListenerResult = __esModule.addChangeListener(() => obj.handleFileSystemStoreChanged());
return obj;
}
}
const prototype = LowDiskTrim.prototype;
prototype["handlePostConnectionOpen"] = function handlePostConnectionOpen() {
this.isLowDisk = false;
const result = this.handleFileSystemStoreChanged();
};
prototype["handleFileSystemStoreChanged"] = function handleFileSystemStoreChanged() {
const self = this;
const isLowDisk = importDefaultResult.isLowDisk;
let tmp = isLowDisk;
if (isLowDisk) {
tmp = self.isLowDisk !== isLowDisk;
}
if (tmp) {
obj = obj(1907);
const databaseResult = obj.database();
if (databaseResult != null) {
databaseResult.incrementalVacuum();
}
}
self.isLowDisk = isLowDisk;
};
prototype["resetInMemoryState"] = function resetInMemoryState() {
};
obj = Object.create(LowDiskTrim.prototype);
obj.isLowDisk = false;
obj.actions = {
POST_CONNECTION_OPEN() {
return obj.handlePostConnectionOpen();
}
};
importDefaultResult.addChangeListener(() => obj.handleFileSystemStoreChanged());
let result = require("set").fileFinishedImporting("modules/app_database/modules/LowDiskTrim.tsx");
export default obj;