Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number Diff line number Diff line change
Expand Up @@ -686,11 +686,12 @@ public void openActionsMenu(final int filesCount, final Set<OCFile> checkedFiles
}

if (isAPKorAAB(checkedFiles)) {
toHide.add(R.id.action_send_share_file);
toHide.add(R.id.action_export_file);
toHide.add(R.id.action_sync_file);
toHide.add(R.id.action_download_file);
}
// NMC: always hide the share menu because we have renamed another menu for sharing (NMC)
toHide.add(R.id.action_send_share_file);

final FragmentManager childFragmentManager = getChildFragmentManager();
FileActionsBottomSheet.newInstance(filesCount, checkedFiles, isOverflow, toHide)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,9 @@ class PreviewImageFragment : FileFragment(), Injectable {
R.id.action_move_or_copy,
R.id.action_favorite,
R.id.action_unset_favorite,
R.id.action_pin_to_homescreen
R.id.action_pin_to_homescreen,
// hide this option for NMC
R.id.action_see_details
)
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,9 @@ class PreviewMediaActivity :
R.id.action_move_or_copy,
R.id.action_favorite,
R.id.action_unset_favorite,
R.id.action_pin_to_homescreen
R.id.action_pin_to_homescreen,
// hide this option for NMC
R.id.action_see_details
)

if (getFile() != null && getFile().isSharedWithMe && !getFile().canReshare()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,9 @@ class PreviewMediaFragment : FileFragment(), OnTouchListener, Injectable {
R.id.action_move_or_copy,
R.id.action_favorite,
R.id.action_unset_favorite,
R.id.action_pin_to_homescreen
R.id.action_pin_to_homescreen,
// hide this option for NMC
R.id.action_see_details
)
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,9 @@ private void showFileActions(OCFile file) {
R.id.action_move_or_copy,
R.id.action_favorite,
R.id.action_unset_favorite,
R.id.action_pin_to_homescreen
R.id.action_pin_to_homescreen,
//hide this option for NMC
R.id.action_see_details
));
if (getFile() != null && getFile().isSharedWithMe() && !getFile().canReshare()) {
additionalFilter.add(R.id.action_send_share_file);
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)
}
}