Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings for OCFileListFragment #12112

Closed
wants to merge 14 commits into from

Conversation

alperozturk96
Copy link
Collaborator

@alperozturk96 alperozturk96 commented Oct 31, 2023

  • Tests written, or not not needed

@@ -1786,38 +1734,8 @@ private void encryptFolder(OCFile folder,
}
}

@Subscribe(threadMode = ThreadMode.BACKGROUND)
public void onMessageEvent(FileLockEvent event) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused function

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like mentioned in the other PR, I expect the event bus to make use of them, so this should actually be a false-positive, best to check with @tobiasKaminsky

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this is still used.
You can check where FileLockEvent is being used:
Within FileOperationsHelper there is: EventBus.getDefault().post(new FileLockEvent(file.getRemotePath(), shouldBeLocked));

This is to send the event, and the other function receives it.

In long term I would like to get rid of it…

Copy link
Member

@tobiasKaminsky tobiasKaminsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-add event bus function.

github-actions and others added 2 commits November 8, 2023 15:09
@@ -1786,6 +1731,7 @@ private void encryptFolder(OCFile folder,
}
}

// Do not delete this function
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Do not delete this function

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IDE will always show as unused function better to keep that comment

@alperozturk96
Copy link
Collaborator Author

/rebase

Signed-off-by: alperozturk <[email protected]>
@alperozturk96
Copy link
Collaborator Author

/rebase

@alperozturk96
Copy link
Collaborator Author

/rebase

@alperozturk96
Copy link
Collaborator Author

/rebase

Signed-off-by: alperozturk <[email protected]>
@alperozturk96
Copy link
Collaborator Author

/rebase

Signed-off-by: alperozturk <[email protected]>
@tobiasKaminsky
Copy link
Member

/rebase

Copy link

Codacy

Lint

TypemasterPR
Warnings6968
Errors33

SpotBugs

CategoryBaseNew
Bad practice6868
Correctness7272
Dodgy code351345
Experimental22
Internationalization77
Malicious code vulnerability22
Multithreaded correctness66
Performance5656
Security1818
Total582576

Copy link

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/12112.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.

Copy link

blue-Light-Screenshot test failed, but no output was generated. Maybe a preliminary stage failed.

@alperozturk96
Copy link
Collaborator Author

Out of date due to conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants