Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugeny committed Aug 24, 2024
1 parent 82013e3 commit f0d228b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 20 deletions.
7 changes: 1 addition & 6 deletions tabby-core/src/api/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export interface MessageBoxResult {

export abstract class FileTransfer {
abstract getName (): string
abstract getRelativePath (): string | null
abstract getMode (): number
abstract getSize (): number
abstract close (): void
Expand Down Expand Up @@ -244,7 +243,7 @@ export class HTMLFileUpload extends FileUpload {
private stream: ReadableStream
private reader: ReadableStreamDefaultReader

constructor (private file: File, private relativePath: string|null = null) {
constructor (private file: File) {
super()
this.stream = this.file.stream()
this.reader = this.stream.getReader()
Expand All @@ -254,10 +253,6 @@ export class HTMLFileUpload extends FileUpload {
return this.file.name
}

getRelativePath (): string|null {
return this.relativePath
}

getMode (): number {
return 0o644
}
Expand Down
10 changes: 1 addition & 9 deletions tabby-electron/src/services/platform.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ class ElectronFileUpload extends FileUpload {
private buffer: Buffer
private powerSaveBlocker = 0

constructor (private filePath: string, private electron: ElectronService, private relativePath: string|null = null ) {
constructor (private filePath: string, private electron: ElectronService) {
super()
this.buffer = Buffer.alloc(256 * 1024)
this.powerSaveBlocker = electron.powerSaveBlocker.start('prevent-app-suspension')
Expand All @@ -320,10 +320,6 @@ class ElectronFileUpload extends FileUpload {
return path.basename(this.filePath)
}

getRelativePath (): string|null {
return this.relativePath
}

getMode (): number {
return this.mode
}
Expand Down Expand Up @@ -366,10 +362,6 @@ class ElectronFileDownload extends FileDownload {
return path.basename(this.filePath)
}

getRelativePath (): null {
return null
}

getMode (): number {
return this.mode
}
Expand Down
5 changes: 0 additions & 5 deletions tabby-web/src/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ class HTMLFileDownload extends FileDownload {
private name: string,
private mode: number,
private size: number,
private relativePath: string|null = null,
) {
super()
}
Expand All @@ -164,10 +163,6 @@ class HTMLFileDownload extends FileDownload {
return this.name
}

getRelativePath (): string|null {
return this.relativePath
}

getMode (): number {
return this.mode
}
Expand Down

0 comments on commit f0d228b

Please sign in to comment.