Skip to content

Commit

Permalink
File action menu icon changed and test case added.
Browse files Browse the repository at this point in the history
  • Loading branch information
surinder-tsys committed Aug 5, 2024
1 parent cf222d4 commit eb3c30c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/src/main/java/com/nextcloud/ui/fileactions/FileAction.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ enum class FileAction(@IdRes val id: Int, @StringRes val title: Int, @DrawableRe

// generic file actions
EDIT(R.id.action_edit, R.string.action_edit, R.drawable.ic_edit),
SEE_DETAILS(R.id.action_see_details, R.string.actionbar_see_details, R.drawable.ic_information_outline),
SEE_DETAILS(R.id.action_see_details, R.string.actionbar_see_details, R.drawable.ic_share),
REMOVE_FILE(R.id.action_remove_file, R.string.common_remove, R.drawable.ic_delete),

// File moving
RENAME_FILE(R.id.action_rename_file, R.string.common_rename, R.drawable.ic_rename),
MOVE_OR_COPY(R.id.action_move_or_copy, R.string.actionbar_move_or_copy, R.drawable.ic_external),
MOVE_OR_COPY(R.id.action_move_or_copy, R.string.actionbar_move_or_copy, R.drawable.ic_content_copy),

// favorites
FAVORITE(R.id.action_favorite, R.string.favorite, R.drawable.ic_star),
UNSET_FAVORITE(R.id.action_unset_favorite, R.string.unset_favorite, R.drawable.ic_star_outline),

// Uploads and downloads
DOWNLOAD_FILE(R.id.action_download_file, R.string.filedetails_download, R.drawable.ic_cloud_download),
SYNC_FILE(R.id.action_sync_file, R.string.filedetails_sync_file, R.drawable.ic_cloud_sync_on),
SYNC_FILE(R.id.action_sync_file, R.string.filedetails_sync_file, R.drawable.ic_cloud_download),
CANCEL_SYNC(R.id.action_cancel_sync, R.string.common_cancel_sync, R.drawable.ic_cloud_sync_off),

// File sharing
Expand Down
17 changes: 17 additions & 0 deletions app/src/test/java/com/nmc/android/FileActionIconTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.nmc.android

import com.nextcloud.ui.fileactions.FileAction
import org.junit.Assert
import org.junit.Test
import com.owncloud.android.R

class FileActionIconTest {

@Test
fun verifyShareAndSyncFileIcon(){
val list = FileAction.SORTED_VALUES
Assert.assertEquals(R.drawable.ic_share,list[4].icon)
Assert.assertEquals(R.drawable.ic_content_copy,list[7].icon)
Assert.assertEquals(R.drawable.ic_cloud_download,list[8].icon)
}
}

0 comments on commit eb3c30c

Please sign in to comment.