Skip to content

Commit

Permalink
Fix git conflicts for converted kt file
Browse files Browse the repository at this point in the history
Signed-off-by: alperozturk <[email protected]>
  • Loading branch information
alperozturk96 committed Aug 26, 2024
1 parent aa7bb5a commit b19bb6c
Showing 1 changed file with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@ import com.google.common.collect.Sets
import com.nextcloud.client.account.CurrentAccountProvider
import com.nextcloud.client.di.Injectable
import com.nextcloud.utils.extensions.getParcelableArgument
import com.nextcloud.utils.fileNameValidator.FileNameValidator.isFileHidden
import com.nextcloud.utils.fileNameValidator.FileNameValidator.checkFileName
import com.nextcloud.utils.fileNameValidator.FileNameValidator.isFileHidden
import com.owncloud.android.R
import com.owncloud.android.databinding.EditBoxDialogBinding
import com.owncloud.android.datamodel.FileDataStorageManager
import com.owncloud.android.datamodel.OCFile
import com.owncloud.android.lib.resources.status.OCCapability
import com.owncloud.android.ui.activity.ComponentsGetter
import com.owncloud.android.ui.activity.FileDisplayActivity
import com.owncloud.android.utils.DisplayUtils
import com.owncloud.android.utils.KeyboardUtils
import com.owncloud.android.utils.theme.ViewThemeUtils
Expand Down Expand Up @@ -144,9 +145,14 @@ class RenameFileDialogFragment : DialogFragment(), DialogInterface.OnClickListen
return
}

if (requireActivity() is ComponentsGetter) {
val componentsGetter = requireActivity() as ComponentsGetter
componentsGetter.getFileOperationsHelper().renameFile(mTargetFile, newFileName)
if (mTargetFile?.isOfflineOperation == true) {
fileDataStorageManager.renameCreateFolderOfflineOperation(mTargetFile, newFileName)
if (requireActivity() is FileDisplayActivity) {
val activity = requireActivity() as FileDisplayActivity
activity.refreshFolderWithDelay()
}
} else {
(requireActivity() as ComponentsGetter).fileOperationsHelper.renameFile(mTargetFile, newFileName)
}
}
}
Expand Down

0 comments on commit b19bb6c

Please sign in to comment.