Merge branch 'ios_bug_symptom_not_shown' into 'master'

Ios bug symptom not shown

See merge request bloodyhealth/drip!187
This commit is contained in:
tina
2019-02-25 16:58:54 +00:00
5 changed files with 575 additions and 426 deletions
+2 -2
View File
@@ -43,11 +43,11 @@ export default class DayColumn extends Component {
} else if (symptom === 'pain') {
// is any pain documented?
acc.pain = cycleDay.pain &&
Object.values(cycleDay.pain).some(x => x === true)
Object.values({...cycleDay.pain}).some(x => x === true)
} else if (symptom === 'mood') {
// is mood documented?
acc.mood = cycleDay.mood &&
Object.values(cycleDay.mood).some(x => x === true)
Object.values({...cycleDay.mood}).some(x => x === true)
}
acc[`${symptom}Exclude`] = cycleDay[symptom] && cycleDay[symptom].exclude
return acc
+3 -3
View File
@@ -106,7 +106,7 @@ export default class CycleDayOverView extends Component {
},
sex: sex => {
let sexLabel = []
if (sex && Object.values(sex).some(val => val)){
if (sex && Object.values({...sex}).some(val => val)){
Object.keys(sex).forEach(key => {
if(sex[key] && key !== 'other' && key !== 'note') {
sexLabel.push(
@@ -128,7 +128,7 @@ export default class CycleDayOverView extends Component {
},
pain: pain => {
let painLabel = []
if (pain && Object.values(pain).some(val => val)){
if (pain && Object.values({...pain}).some(val => val)){
Object.keys(pain).forEach(key => {
if(pain[key] && key !== 'other' && key !== 'note') {
painLabel.push(painLabels[key])
@@ -147,7 +147,7 @@ export default class CycleDayOverView extends Component {
},
mood: mood => {
let moodLabel = []
if (mood && Object.values(mood).some(val => val)){
if (mood && Object.values({...mood}).some(val => val)){
Object.keys(mood).forEach(key => {
if(mood[key] && key !== 'other' && key !== 'note') {
moodLabel.push(moodLabels[key])
File diff suppressed because it is too large Load Diff
+29 -1
View File
@@ -9,6 +9,7 @@
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import <React/RCTPushNotificationManager.h>
@implementation AppDelegate
@@ -19,7 +20,7 @@
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
moduleName:@"drip"
moduleName:@"home"
initialProperties:nil
launchOptions:launchOptions];
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
@@ -32,4 +33,31 @@
return YES;
}
// Required to register for notifications
- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings
{
[RCTPushNotificationManager didRegisterUserNotificationSettings:notificationSettings];
}
// Required for the register event.
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
[RCTPushNotificationManager didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
}
// Required for the notification event. You must call the completion handler after handling the remote notification.
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler
{
[RCTPushNotificationManager didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];
}
// Required for the registrationError event.
- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error
{
[RCTPushNotificationManager didFailToRegisterForRemoteNotificationsWithError:error];
}
// Required for the localNotification event.
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification
{
[RCTPushNotificationManager didReceiveLocalNotification:notification];
}
@end
+1
View File
@@ -9,6 +9,7 @@
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"android": "react-native run-android",
"ios": "react-native run-ios --simulator=\"iPhone 8 Plus\"",
"log": "react-native log-android",
"test": "mocha --recursive --require @babel/register test && npm run lint",
"test-watch": "mocha --recursive --require @babel/register --watch test",