Skip to content

Commit

Permalink
feat: Added icon shortcut to RemoveFilesDialogFragment
Browse files Browse the repository at this point in the history
  • Loading branch information
Aitorbp committed Jun 20, 2024
1 parent 7bef6bc commit 9c525a2
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import com.owncloud.android.datamodel.ThumbnailsCacheManager
import com.owncloud.android.domain.files.model.OCFile
import com.owncloud.android.presentation.files.operations.FileOperation
import com.owncloud.android.presentation.files.operations.FileOperationsViewModel
import com.owncloud.android.ui.activity.FileDisplayActivity.Companion.MIMETYPE_TEXT_URI_LIST
import com.owncloud.android.utils.MimetypeIconUtil
import org.koin.androidx.viewmodel.ext.android.sharedViewModel

Expand Down Expand Up @@ -121,9 +122,13 @@ class RemoveFilesDialogFragment(
if (thumbnail != null) {
thumbnailImageView.setImageBitmap(thumbnail)
} else {
thumbnailImageView.setImageResource(
MimetypeIconUtil.getFileTypeIconId(file.mimeType, file.fileName)
)
if (file.mimeType == MIMETYPE_TEXT_URI_LIST) {
thumbnailImageView.setImageResource(R.drawable.ic_action_open_shortcut)
} else {
thumbnailImageView.setImageResource(
MimetypeIconUtil.getFileTypeIconId(file.mimeType, file.fileName)
)
}
}
} else {
thumbnailImageView.visibility = View.GONE
Expand Down

0 comments on commit 9c525a2

Please sign in to comment.