mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 07:05:49 +03:00
remove literals in conditional statements
This commit is contained in:
parent
3c7fe3a405
commit
3848346f4a
2 changed files with 4 additions and 2 deletions
|
@ -94,6 +94,7 @@ public class FileDetailSharingFragment extends Fragment implements ShareeListAda
|
|||
|
||||
private static final String ARG_FILE = "FILE";
|
||||
private static final String ARG_USER = "USER";
|
||||
public static final int PERMISSION_EDITING_ALLOWED = 17;
|
||||
|
||||
// to show share with users/groups info
|
||||
private List<OCShare> shares;
|
||||
|
@ -390,7 +391,7 @@ public class FileDetailSharingFragment extends Fragment implements ShareeListAda
|
|||
|
||||
menu.findItem(R.id.action_share_send_note).setVisible(capabilities.getVersion().isNoteOnShareSupported());
|
||||
|
||||
if (publicShare.getPermissions() > 17) {
|
||||
if (publicShare.getPermissions() > PERMISSION_EDITING_ALLOWED) {
|
||||
menu.findItem(R.id.action_allow_editing).setChecked(true);
|
||||
} else {
|
||||
menu.findItem(R.id.action_allow_editing).setChecked(false);
|
||||
|
|
|
@ -118,6 +118,7 @@ public class FileOperationsHelper {
|
|||
private static final String FILE_EXTENSION_URL = "url";
|
||||
private static final String FILE_EXTENSION_DESKTOP = "desktop";
|
||||
private static final String FILE_EXTENSION_WEBLOC = "webloc";
|
||||
public static final int SINGLE_LINK_SIZE = 1;
|
||||
|
||||
private FileActivity fileActivity;
|
||||
private CurrentAccountProvider currentAccount;
|
||||
|
@ -482,7 +483,7 @@ public class FileOperationsHelper {
|
|||
ShareType.PUBLIC_LINK,
|
||||
"");
|
||||
|
||||
if (shares.size() == 1) {
|
||||
if (shares.size() == SINGLE_LINK_SIZE) {
|
||||
FileActivity.copyAndShareFileLink(fileActivity, file, shares.get(0).getShareLink());
|
||||
} else {
|
||||
if (fileActivity instanceof FileDisplayActivity) {
|
||||
|
|
Loading…
Reference in a new issue