Skip to content

Commit

Permalink
Replace sealed class with sealed interface
Browse files Browse the repository at this point in the history
  • Loading branch information
abelgardep committed Sep 29, 2022
1 parent 9fdc18e commit 0bb73a2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ package com.owncloud.android.presentation.ui.files.operations

import com.owncloud.android.domain.files.model.OCFile

sealed class FileOperation {
data class CopyOperation(val listOfFilesToCopy: List<OCFile>, val targetFolder: OCFile) : FileOperation()
data class CreateFolder(val folderName: String, val parentFile: OCFile) : FileOperation()
data class MoveOperation(val listOfFilesToMove: List<OCFile>, val targetFolder: OCFile) : FileOperation()
data class RemoveOperation(val listOfFilesToRemove: List<OCFile>, val removeOnlyLocalCopy: Boolean) : FileOperation()
data class RenameOperation(val ocFileToRename: OCFile, val newName: String) : FileOperation()
data class SynchronizeFileOperation(val fileToSync: OCFile, val accountName: String) : FileOperation()
data class SetFilesAsAvailableOffline(val filesToUpdate: List<OCFile>) : FileOperation()
data class UnsetFilesAsAvailableOffline(val filesToUpdate: List<OCFile>) : FileOperation()
sealed interface FileOperation {
data class CopyOperation(val listOfFilesToCopy: List<OCFile>, val targetFolder: OCFile) : FileOperation
data class CreateFolder(val folderName: String, val parentFile: OCFile) : FileOperation
data class MoveOperation(val listOfFilesToMove: List<OCFile>, val targetFolder: OCFile) : FileOperation
data class RemoveOperation(val listOfFilesToRemove: List<OCFile>, val removeOnlyLocalCopy: Boolean) : FileOperation
data class RenameOperation(val ocFileToRename: OCFile, val newName: String) : FileOperation
data class SynchronizeFileOperation(val fileToSync: OCFile, val accountName: String) : FileOperation
data class SetFilesAsAvailableOffline(val filesToUpdate: List<OCFile>) : FileOperation
data class UnsetFilesAsAvailableOffline(val filesToUpdate: List<OCFile>) : FileOperation
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import com.owncloud.android.presentation.ui.settings.fragments.SettingsMoreFragm
import com.owncloud.android.presentation.ui.settings.fragments.SettingsPictureUploadsFragment
import com.owncloud.android.presentation.ui.settings.fragments.SettingsSecurityFragment
import com.owncloud.android.presentation.ui.settings.fragments.SettingsVideoUploadsFragment
import com.owncloud.android.providers.WorkManagerProvider
import com.owncloud.android.ui.activity.FileDisplayActivity

class SettingsActivity : AppCompatActivity() {
Expand Down

0 comments on commit 0bb73a2

Please sign in to comment.