Skip to content

Commit

Permalink
chore: Use ErrorCode.CONFLICT_ERROR instead of a string
Browse files Browse the repository at this point in the history
  • Loading branch information
TommyDL-Infomaniak authored and KevinBoulongne committed Feb 25, 2025
1 parent a4ab96c commit a049b6e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import androidx.navigation.navGraphViewModels
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
import com.infomaniak.drive.MatomoDrive.trackTrashEvent
import com.infomaniak.drive.R
import com.infomaniak.drive.data.api.ErrorCode
import com.infomaniak.drive.data.models.File
import com.infomaniak.drive.databinding.FragmentBottomSheetTrashedFileActionsBinding
import com.infomaniak.drive.ui.MainViewModel
Expand Down Expand Up @@ -115,7 +116,7 @@ class TrashedFileActionsBottomSheetDialog : BottomSheetDialogFragment() {

private fun getErrorMessage(fileResult: FileResult) = when (fileResult.errorCode) {
ApiErrorCode.AN_ERROR_HAS_OCCURRED -> R.string.errorRestore
"conflict_error" -> R.string.errorConflict
ErrorCode.CONFLICT_ERROR -> R.string.errorConflict
else -> fileResult.errorResId
}

Expand Down

0 comments on commit a049b6e

Please sign in to comment.