Skip to content

Commit 36bf1e4

Browse files
committed
Remove events stuff
1 parent ff9562e commit 36bf1e4

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

src/requests.ts

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,6 @@ export async function getContents(
9696
options
9797
);
9898

99-
// Emit custom event for status widget to listen to
100-
const event = new CustomEvent('drive-status-update', {
101-
detail: {
102-
type: 'loading',
103-
path: options.path,
104-
driveName: driveName
105-
}
106-
});
107-
window.dispatchEvent(event);
108-
10999
const response = await requestAPI<any>(
110100
'drives/' + driveName + '/' + options.path,
111101
'GET'
@@ -118,17 +108,6 @@ export async function getContents(
118108
if (isDir) {
119109
console.log('debug: isDir:', isDir);
120110

121-
// Emit event for directory loaded
122-
const loadedEvent = new CustomEvent('drive-status-update', {
123-
detail: {
124-
type: 'loaded',
125-
path: options.path,
126-
driveName: driveName,
127-
itemType: 'directory'
128-
}
129-
});
130-
window.dispatchEvent(loadedEvent);
131-
132111
const fileList: IContentsList = {};
133112

134113
response.data.forEach((row: any) => {
@@ -171,17 +150,6 @@ export async function getContents(
171150
else {
172151
console.log('debug: isFile:');
173152

174-
// Emit event for file loaded
175-
const loadedEvent = new CustomEvent('drive-status-update', {
176-
detail: {
177-
type: 'loaded',
178-
path: options.path,
179-
driveName: driveName,
180-
itemType: 'file'
181-
}
182-
});
183-
window.dispatchEvent(loadedEvent);
184-
185153
const [fileType, fileMimeType, fileFormat] = getFileType(
186154
PathExt.extname(PathExt.basename(options.path)),
187155
options.registeredFileTypes

0 commit comments

Comments
 (0)