Skip to content

Commit

Permalink
Update settings in app widget as needed
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean Luis Urena committed Aug 28, 2018
1 parent fb52d4a commit 17495e8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions ritscheduler/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ android {
applicationId "me.jlurena.ritscheduler"
minSdkVersion 22
targetSdkVersion 27
versionCode 1
versionName "1.0"
versionCode 2
versionName "2"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
renderscriptTargetApi 18
renderscriptSupportModeEnabled true
Expand Down
2 changes: 1 addition & 1 deletion ritscheduler/release/output.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"1.0","enabled":true,"outputFile":"ritscheduler-release.apk","fullName":"release","baseName":"release"},"path":"ritscheduler-release.apk","properties":{}}]
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":2,"versionName":"2","enabled":true,"outputFile":"ritscheduler-release.apk","fullName":"release","baseName":"release"},"path":"ritscheduler-release.apk","properties":{}}]
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public class WidgetRemoteViewsFactory extends BroadcastReceiver implements Remot

private final Context context;
private final DataManager dataManager;
private final SettingsManager settings;
private List<Course> courses;
private WeekView weekView;
private Calendar currentDay;
Expand All @@ -53,7 +52,6 @@ public class WidgetRemoteViewsFactory extends BroadcastReceiver implements Remot
filter.addAction(WidgetProvider.ACTION_NEXT);
filter.addAction(WidgetProvider.ACTION_REFRESH);
context.registerReceiver(this, filter);
this.settings = SettingsManager.getInstance(context);
updateCourseList(null);
}

Expand Down Expand Up @@ -123,7 +121,7 @@ public String interpretTime(int hour, int minutes) {
break;
}
}

SettingsManager settings = SettingsManager.getInstance(context);
int height = (weekView.getMaxTime() - weekView.getMinTime()) * Util.dp2px(50);
int day = currentDay.get(Calendar.DAY_OF_WEEK);
day = day == 1 ? 7 : day - 1;
Expand Down

0 comments on commit 17495e8

Please sign in to comment.