Skip to content

Commit

Permalink
Merge pull request #2884 from ChildMindInstitute/local_notifications
Browse files Browse the repository at this point in the history
Local notifications
  • Loading branch information
anq83 authored Nov 28, 2022
2 parents 459f1fe + 45d508d commit 7800eff
Show file tree
Hide file tree
Showing 57 changed files with 3,199 additions and 1,327 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,4 @@ android/app/src/main/assets/index.android.bundle.meta
# Bundle artifact
*.jsbundle

.vscode/*
2 changes: 0 additions & 2 deletions .vscode/settings.json

This file was deleted.

3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.21.60] - 2022-11-28
- Bugfixes: 2541, 1781, Local notifications

## [0.21.59] - 2022-10-31
- Bugfixes: 2842 (fix for iOS), 2834, 1064

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# MindLogger 0.21.59
# MindLogger 0.21.60

_Note: v0.1 is deprecated as of June 12, 2019._

Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ android {
applicationId "lab.childmindinstitute.data"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 614
versionName "0.21.59"
versionCode 615
versionName "0.21.60"
missingDimensionStrategy 'react-native-camera', 'general'
multiDexEnabled true
}
Expand Down
1 change: 1 addition & 0 deletions android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@

# Add any project specific keep options here:
-keep class io.invertase.firebase.** { *; }
-keep class com.transistorsoft.rnbackgroundfetch.HeadlessTask { *; }
-dontwarn io.invertase.firebase.**
18 changes: 12 additions & 6 deletions android/app/src/main/assets/html/visual-stimulus-response.html

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ allprojects {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
maven {
// react-native-background-fetch
url("${project(':react-native-background-fetch').projectDir}/libs")
}

google()
jcenter()
Expand Down
17 changes: 4 additions & 13 deletions app/components/ActivityList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
finishedEventsSelector,
} from '../../state/app/app.selectors';
import { activityAccessSelector } from '../../state/applets/applets.selectors';
import { getSchedules, setReminder, cancelReminder } from '../../state/applets/applets.thunks';
import { getSchedules } from '../../state/applets/applets.thunks';
import { syncUploadQueue } from '../../state/app/app.thunks';
import { setUpdatedTime, setAppStatus, setConnection } from '../../state/app/app.actions';
import { setActivityFlows } from '../../state/activityFlows/activityFlows.actions';
Expand All @@ -35,8 +35,6 @@ const ActivityList = ({
syncUploadQueue,
appStatus,
setConnection,
setReminder,
cancelReminder,
scheduleUpdated,
isConnected,
setScheduleUpdated,
Expand Down Expand Up @@ -71,8 +69,6 @@ const ActivityList = ({

const handleConnectivityChange = (connection) => {
if (connection.isConnected) {
cancelReminder();

if (!isConnected && !currentConnection) {
currentConnection = true;
setConnection(true);
Expand All @@ -81,7 +77,6 @@ const ActivityList = ({
} else {
currentConnection = false;
setConnection(false);
setReminder();
}
}

Expand Down Expand Up @@ -148,7 +143,7 @@ const ActivityList = ({
<ActivityListItem
disabled={activity.status === 'scheduled' && !activity.event.data.timeout.access}
onPress={() => onPressActivity(activity)}
onLongPress={() => onLongPressActivity(activity)}
//onLongPress={() => onLongPressActivity(activity)}
activity={activity}
applet={applet}
orderIndex={orderIndex || {}}
Expand All @@ -159,7 +154,7 @@ const ActivityList = ({
{prizeActivity && (
<ActivityListItem
onPress={() => onPressActivity(prizeActivity)}
onLongPress={() => onLongPressActivity(prizeActivity)}
//onLongPress={() => onLongPressActivity(prizeActivity)}
activity={prizeActivity}
/>
)}
Expand All @@ -184,9 +179,7 @@ ActivityList.propTypes = {
setScheduleUpdated: PropTypes.func.isRequired,
isConnected: PropTypes.bool.isRequired,
scheduleUpdated: PropTypes.bool.isRequired,
syncUploadQueue: PropTypes.func.isRequired,
setReminder: PropTypes.func.isRequired,
cancelReminder: PropTypes.func.isRequired,
syncUploadQueue: PropTypes.func.isRequired
};

const mapStateToProps = (state) => {
Expand All @@ -213,8 +206,6 @@ const mapDispatchToProps = {
setConnection,
setScheduleUpdated,
syncUploadQueue,
setReminder,
cancelReminder,
setActivities,
};

Expand Down
Loading

0 comments on commit 7800eff

Please sign in to comment.