Skip to content

Fixes #171 Fix Lint errors/warnings: global, coding style: add missing spaces #1955

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 5 commits into from
Nov 4, 2018
Merged

Conversation

poranje
Copy link
Contributor

@poranje poranje commented Oct 26, 2018

global, coding style: add missing spaces

Fixes #{GitHub issue number and title (Please do not forget adding title) }

Description (required)

Fixes #171 (partially)

Tests performed (required)

none

@codecov-io
Copy link

codecov-io commented Oct 26, 2018

Codecov Report

Merging #1955 into master will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #1955   +/-   ##
======================================
  Coverage    4.37%   4.37%           
======================================
  Files         211     211           
  Lines       10634   10634           
  Branches      954     954           
======================================
  Hits          465     465           
  Misses      10134   10134           
  Partials       35      35
Impacted Files Coverage Δ
...ree/nrw/commons/concurrency/ThreadPoolService.java 54.28% <ø> (ø) ⬆️
.../fr/free/nrw/commons/widget/PicOfDayAppWidget.java 0% <ø> (ø) ⬆️
...ava/fr/free/nrw/commons/utils/UriDeserializer.java 0% <ø> (ø) ⬆️
...va/fr/free/nrw/commons/ui/widget/HtmlTextView.java 0% <ø> (ø) ⬆️
...ain/java/fr/free/nrw/commons/nearby/Sitelinks.java 0% <ø> (ø) ⬆️
...ree/nrw/commons/di/CommonsDaggerIntentService.java 0% <ø> (ø) ⬆️
...fr/free/nrw/commons/settings/SettingsActivity.java 61.11% <ø> (ø) ⬆️
...nrw/commons/di/CommonsDaggerAppCompatActivity.java 72.72% <ø> (ø) ⬆️
...ree/nrw/commons/notification/NotificationType.java 0% <ø> (ø) ⬆️
.../free/nrw/commons/nearby/NearbyAdapterFactory.java 0% <ø> (ø) ⬆️
... and 57 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 27123f5...484aac2. Read the comment docs.

Copy link
Member

@domdomegg domdomegg left a comment

Choose a reason for hiding this comment

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

Thanks for the pull request! I've made a bunch of suggestions for other if statement fixes and resolved some merge conflicts.

Please can you

  • Review my suggestions
  • Test the new code. I know we shouldn't have broken anything but it's always worth double checking the core functions of the app when making such wide-reaching changes (almost 70 files!)

bottomSheetBehaviorForDetails.setState(BottomSheetBehavior.STATE_HIDDEN);
bottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);
}else if(bottomSheetBehavior.getState()==BottomSheetBehavior.STATE_EXPANDED){
}else if (bottomSheetBehavior.getState()==BottomSheetBehavior.STATE_EXPANDED){
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
}else if (bottomSheetBehavior.getState()==BottomSheetBehavior.STATE_EXPANDED){
} else if (bottomSheetBehavior.getState() == BottomSheetBehavior.STATE_EXPANDED) {

@@ -195,10 +195,10 @@ public boolean onOptionsItemSelected(MenuItem item) {
// Handle item selection
switch (item.getItemId()) {
case R.id.action_display_list:
if(bottomSheetBehavior.getState()==BottomSheetBehavior.STATE_COLLAPSED || bottomSheetBehavior.getState()==BottomSheetBehavior.STATE_HIDDEN){
if (bottomSheetBehavior.getState()==BottomSheetBehavior.STATE_COLLAPSED || bottomSheetBehavior.getState()==BottomSheetBehavior.STATE_HIDDEN){
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (bottomSheetBehavior.getState()==BottomSheetBehavior.STATE_COLLAPSED || bottomSheetBehavior.getState()==BottomSheetBehavior.STATE_HIDDEN){
if (bottomSheetBehavior.getState() == BottomSheetBehavior.STATE_COLLAPSED || bottomSheetBehavior.getState() == BottomSheetBehavior.STATE_HIDDEN) {

@@ -281,7 +281,7 @@ private void updateMapToTrackPosition() {

// Make camera to follow user on location change
CameraPosition position ;
if(ViewUtil.isPortrait(getActivity())){
if (ViewUtil.isPortrait(getActivity())){
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (ViewUtil.isPortrait(getActivity())){
if (ViewUtil.isPortrait(getActivity())) {

@@ -416,7 +416,7 @@ private void setListeners() {
mapView.getMapAsync(mapboxMap -> {
CameraPosition position;

if(ViewUtil.isPortrait(getActivity())){
if (ViewUtil.isPortrait(getActivity())){
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (ViewUtil.isPortrait(getActivity())){
if (ViewUtil.isPortrait(getActivity())) {

@@ -87,7 +87,7 @@ private void refresh() {
private void addNotifications() {
Timber.d("Add notifications");

if(mNotificationWorkerFragment == null){
if (mNotificationWorkerFragment == null){
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (mNotificationWorkerFragment == null){
if (mNotificationWorkerFragment == null) {

@@ -95,7 +95,7 @@ private void saveQuery(String query) {
public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_browse_image, container, false);
ButterKnife.bind(this, rootView);
if(getActivity().getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT){
if (getActivity().getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT){
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (getActivity().getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT){
if (getActivity().getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {

@@ -97,7 +97,7 @@ private void saveQuery(String query) {
public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_browse_image, container, false);
ButterKnife.bind(this, rootView);
if(getActivity().getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT){
if (getActivity().getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT){
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (getActivity().getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT){
if (getActivity().getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {

@@ -418,14 +418,14 @@ public void onTextChanged(CharSequence s, int start, int before, int count) {

@OnClick(R.id.seeMore)
public void onSeeMoreClicked(){
if(nominatedForDeletion.getVisibility()== VISIBLE) {
if (nominatedForDeletion.getVisibility()== VISIBLE) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (nominatedForDeletion.getVisibility()== VISIBLE) {
if (nominatedForDeletion.getVisibility() == VISIBLE) {

@@ -156,7 +156,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
viewIntent.setAction(ACTION_VIEW);
viewIntent.setData(m.getFilePageTitle().getMobileUri());
//check if web browser available
if(viewIntent.resolveActivity(getActivity().getPackageManager()) != null){
if (viewIntent.resolveActivity(getActivity().getPackageManager()) != null){
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (viewIntent.resolveActivity(getActivity().getPackageManager()) != null){
if (viewIntent.resolveActivity(getActivity().getPackageManager()) != null) {

@@ -58,7 +58,7 @@ public RequestBuilder action(String action) {
}

public String getAuthCookie() {
if(authCookie == null){
if (authCookie == null){
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (authCookie == null){
if (authCookie == null) {

@domdomegg domdomegg self-assigned this Nov 4, 2018
@domdomegg
Copy link
Member

Tested tutorial, login, home, media detail view, nearby, explore, notifications, settings, about page.
2.8.5-debug-pr-1955~484aac2c on Samsung Galaxy S6 with API level 25.

Results

  • All okay

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.

3 participants