package org.stepic.droid.util;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.stepic.droid.configuration.Config;
import org.stepik.android.model.Course;
import org.stepik.android.model.Unit;

import java.util.List;

public class StepikLogicHelper {
    public static long[] fromUnitsToLessonIds(List<Unit> units) {
        long[] lessonsIds = new long[units.size()];
        for (int i = 0; i < units.size(); i++) {
            Unit unit = units.get(i);
            if (unit != null) {
                lessonsIds[i] = unit.getLesson();
            }
        }
        return lessonsIds;
    }

    @NotNull
    public static String getPathForCourseOrEmpty(@Nullable Course course, Config config) {
        if (course == null) {
            return "";
        }
        return course.getCover() == null ? "" : config.getBaseUrl() + course.getCover();
    }
}

@@ -114,54 +114,8 @@
 le;%0A
-import org.stepic.droid.configuration.Config;%0A
 impo
@@ -680,23 +680,8 @@
 urse
-, Config config
 ) %7B%0A
@@ -794,30 +794,8 @@
 %22%22 :
- config.getBaseUrl() +
  cou

change output of method to just course cover