Skip to content

Replaced Butterknife with Viewbinding in MoreBottomSheetFragment.java #5379

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

Merged
merged 1 commit into from
Nov 10, 2023

Conversation

psh
Copy link
Collaborator

@psh psh commented Nov 9, 2023

Replaced Butterknife with viewbinding, and dealt the a whole bunch of code quality warnings in MoreBottomSheetFragment.java

Since the morePeerReview wasnt used, I removed that from the test for clarity.

uploadFeedback(feedback);
}
}).show();
new FeedbackDialog(getContext(), this::uploadFeedback).show();
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Replace anonymous inner class with method reference, suggested by the IDE

final Intent intent = new Intent(getActivity(), AboutActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT | Intent.FLAG_ACTIVITY_SINGLE_TOP);
getActivity().startActivity(intent);
requireActivity().startActivity(intent);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Several different instances - the call to requireActivity() replaces getActivity() to add an implicit (Android supplied) null check.

@psh psh changed the title Replaced Butterknife with Viewbinding Replaced Butterknife with Viewbinding in MoreBottomSheetFragment.java Nov 9, 2023
Copy link
Member

@nicolas-raoul nicolas-raoul left a comment

Choose a reason for hiding this comment

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

Thanks a lot!
Tested, everything seems to work. :-)

@nicolas-raoul nicolas-raoul merged commit 9620f6e into commons-app:main Nov 10, 2023
@psh psh deleted the psh/remove-some-butterknife branch November 10, 2023 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants