Skip to content

Commit

Permalink
Fixed crashes when ArrayList was null in IPresenter.
Browse files Browse the repository at this point in the history
  • Loading branch information
mazurio committed Jan 14, 2016
1 parent bd4dc42 commit ca58d2c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
10 changes: 5 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ android {
productFlavors {
pro {
applicationId 'com.bodyweight.fitness.pro'
versionCode 111
versionName "1.1.1"
versionCode 113
versionName "1.1.3"
}

free {
applicationId 'com.bodyweight.fitness.free'
versionCode 111
versionName "1.1.1"
versionCode 113
versionName "1.1.3"
}
}
buildTypes {
Expand Down Expand Up @@ -109,4 +109,4 @@ dependencies {
transitive = true;
}
compile files('libs/amazon-mobile-associates-1.0.73.0.jar')
}
}
2 changes: 2 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.bodyweight.fitness"
android:installLocation="auto">

<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="23" />

<uses-permission android:name="android.permission.INTERNET" />

<application
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ public void onSubscribe() {}
* @param subscription subscription.
*/
public void subscribe(Subscription subscription) {
if (mSubscriptions == null) {
mSubscriptions = new ArrayList<>();
}

mSubscriptions.add(subscription);
}

Expand All @@ -81,7 +85,7 @@ public void subscribe(Subscription subscription) {
*/
private void unsubscribeAll() {
if (mSubscriptions == null) {
return;
mSubscriptions = new ArrayList<>();
}

for(Subscription s : mSubscriptions) {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<resources>
<string name="app_name">Bodyweight Fitness</string>
<string name="app_version">1.1.1</string>
<string name="app_version">1.1.3</string>

<string name="action_progression">Choose Exercise Progression</string>
<string name="action_about">About</string>
Expand Down

0 comments on commit ca58d2c

Please sign in to comment.