Skip to content

Commit 8e70a2a

Browse files
committed
IO: On-going refactoring on operation handlers
1 parent 9734127 commit 8e70a2a

6 files changed

Lines changed: 7 additions & 7 deletions

File tree

app-workspace-explorer/src/main/java/eu/darken/butler/explorer/core/operations/OperationContext.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ data class OperationContext(
2929
*/
3030
suspend fun <T : ExplorerOperation> BaseOperationHandler<T>.execute(
3131
operation: T
32-
) = executeInContext(this@OperationContext, operation)
32+
) = execute(this@OperationContext, operation)
3333
}

app-workspace-explorer/src/main/java/eu/darken/butler/explorer/core/operations/handlers/BaseOperationHandler.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ abstract class BaseOperationHandler<T : ExplorerOperation>(
1414
protected val gatewaySwitch: GatewaySwitch,
1515
protected val dispatcherProvider: DispatcherProvider,
1616
) {
17-
abstract suspend fun executeInContext(
17+
abstract suspend fun execute(
1818
context: OperationContext,
1919
operation: T,
2020
)

app-workspace-explorer/src/main/java/eu/darken/butler/explorer/core/operations/handlers/CopyOperationHandler.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class CopyOperationHandler @AssistedInject constructor(
4444
) {
4545
private val tag = logTag("Explorer", "Workspace", workspaceId.shortTag, "Operation", "Copy")
4646

47-
override suspend fun executeInContext(
47+
override suspend fun execute(
4848
context: OperationContext,
4949
operation: ExplorerOperation.FileOp.Copy,
5050
): Unit = with(context) {

app-workspace-explorer/src/main/java/eu/darken/butler/explorer/core/operations/handlers/DeleteOperationHandler.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class DeleteOperationHandler @AssistedInject constructor(
3232

3333
private val tag = logTag("Explorer", "Workspace", workspaceId.shortTag, "Operation", "Delete")
3434

35-
override suspend fun executeInContext(
35+
override suspend fun execute(
3636
context: OperationContext,
3737
operation: ExplorerOperation.FileOp.Delete,
3838
): Unit = with(context) {

app-workspace-explorer/src/main/java/eu/darken/butler/explorer/core/operations/handlers/MoveOperationHandler.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class MoveOperationHandler @AssistedInject constructor(
3030

3131
private val tag = logTag("Explorer", "Workspace", workspaceId.shortTag, "OperationEngine", "Move")
3232

33-
override suspend fun executeInContext(
33+
override suspend fun execute(
3434
context: OperationContext,
3535
operation: ExplorerOperation.FileOp.Move,
3636
): Unit = with(context) {
@@ -43,7 +43,7 @@ class MoveOperationHandler @AssistedInject constructor(
4343
}
4444

4545
// Move is copy + delete
46-
copyHandler.executeInContext(
46+
copyHandler.execute(
4747
context,
4848
ExplorerOperation.FileOp.Copy(
4949
sources = operation.sources,

app-workspace-explorer/src/main/java/eu/darken/butler/explorer/core/operations/handlers/RenameOperationHandler.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class RenameOperationHandler @AssistedInject constructor(
2626

2727
private val tag = logTag("Explorer", "Workspace", workspaceId.shortTag, "Operation", "Rename")
2828

29-
override suspend fun executeInContext(
29+
override suspend fun execute(
3030
context: OperationContext,
3131
operation: ExplorerOperation.FileOp.Rename,
3232
): Unit = with(context) {

0 commit comments

Comments
 (0)