CultureQuestORG/SDP2023

View on GitHub
app/src/main/java/ch/epfl/culturequest/social/PictureAdapter.java

Summary

Maintainability
C
1 day
Test Coverage
A
90%

File PictureAdapter.java has 338 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package ch.epfl.culturequest.social;

import static ch.epfl.culturequest.social.RarityLevel.getRarityLevel;

import android.animation.Animator;
Severity: Minor
Found in app/src/main/java/ch/epfl/culturequest/social/PictureAdapter.java - About 4 hrs to fix

    Method onBindViewHolder has 48 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        @Override
        public void onBindViewHolder(@NonNull PictureViewHolder holder, int position) {
            Post post = pictures.get(position);
            String pictureUrl = post.getImageUrl();
    
    
    Severity: Minor
    Found in app/src/main/java/ch/epfl/culturequest/social/PictureAdapter.java - About 1 hr to fix

      Method handleLike has 41 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private void handleLike(@NonNull PictureViewHolder holder, Post post) {
              if (post.getUid().equals(Profile.getActiveProfile().getUid())) {
                  holder.like.setVisibility(View.GONE);
                  return;
              }
      Severity: Minor
      Found in app/src/main/java/ch/epfl/culturequest/social/PictureAdapter.java - About 1 hr to fix

        Method flip has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                private void flip(Context context, View visibleView, View inVisibleView) {
                    isFlipping = true;
                    visibleView.setVisibility(View.VISIBLE);
                    float scale = context.getResources().getDisplayMetrics().density;
                    float cameraDist = 8000 * scale;
        Severity: Minor
        Found in app/src/main/java/ch/epfl/culturequest/social/PictureAdapter.java - About 1 hr to fix

          There are no issues that match your filters.

          Category
          Status