Skip to content

Commit

Permalink
Hotfix for too large parcel size of course list, appeared on openSAP.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Rohloff committed Nov 4, 2016
1 parent 7dbec79 commit d13e260
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
defaultConfig {
minSdkVersion 15
targetSdkVersion 25
versionName "1.6"
versionCode 27
versionName "1.6.1"
versionCode 28
}

productFlavors.all {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
import de.xikolo.controllers.helper.RefeshLayoutController;
import de.xikolo.controllers.main.adapter.CourseListAdapter;
import de.xikolo.controllers.navigation.adapter.NavigationAdapter;
import de.xikolo.managers.CourseManager;
import de.xikolo.managers.UserManager;
import de.xikolo.models.Course;
import de.xikolo.managers.Result;
import de.xikolo.events.EnrollEvent;
import de.xikolo.events.LoginEvent;
import de.xikolo.events.LogoutEvent;
import de.xikolo.events.UnenrollEvent;
import de.xikolo.managers.CourseManager;
import de.xikolo.managers.Result;
import de.xikolo.managers.UserManager;
import de.xikolo.models.Course;
import de.xikolo.utils.DateUtil;
import de.xikolo.utils.NetworkUtil;
import de.xikolo.utils.ToastUtil;
Expand Down Expand Up @@ -108,6 +108,11 @@ protected void onSuccess(List<Course> result, DataSource dataSource) {

courses = result;

// TODO: workaround, parcel size can be too large
for (Course course : courses) {
course.description = course.description.substring(0, 100);
}

if (!NetworkUtil.isOnline(getActivity()) && dataSource.equals(DataSource.LOCAL) && result.size() == 0) {
notificationController.setTitle(R.string.notification_no_network);
notificationController.setSummary(R.string.notification_no_network_with_offline_mode_summary);
Expand Down

0 comments on commit d13e260

Please sign in to comment.