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:
@@ -43,11 +43,11 @@ export default class DayColumn extends Component {
|
|||||||
} else if (symptom === 'pain') {
|
} else if (symptom === 'pain') {
|
||||||
// is any pain documented?
|
// is any pain documented?
|
||||||
acc.pain = cycleDay.pain &&
|
acc.pain = cycleDay.pain &&
|
||||||
Object.values(cycleDay.pain).some(x => x === true)
|
Object.values({...cycleDay.pain}).some(x => x === true)
|
||||||
} else if (symptom === 'mood') {
|
} else if (symptom === 'mood') {
|
||||||
// is mood documented?
|
// is mood documented?
|
||||||
acc.mood = cycleDay.mood &&
|
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
|
acc[`${symptom}Exclude`] = cycleDay[symptom] && cycleDay[symptom].exclude
|
||||||
return acc
|
return acc
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ export default class CycleDayOverView extends Component {
|
|||||||
},
|
},
|
||||||
sex: sex => {
|
sex: sex => {
|
||||||
let sexLabel = []
|
let sexLabel = []
|
||||||
if (sex && Object.values(sex).some(val => val)){
|
if (sex && Object.values({...sex}).some(val => val)){
|
||||||
Object.keys(sex).forEach(key => {
|
Object.keys(sex).forEach(key => {
|
||||||
if(sex[key] && key !== 'other' && key !== 'note') {
|
if(sex[key] && key !== 'other' && key !== 'note') {
|
||||||
sexLabel.push(
|
sexLabel.push(
|
||||||
@@ -128,7 +128,7 @@ export default class CycleDayOverView extends Component {
|
|||||||
},
|
},
|
||||||
pain: pain => {
|
pain: pain => {
|
||||||
let painLabel = []
|
let painLabel = []
|
||||||
if (pain && Object.values(pain).some(val => val)){
|
if (pain && Object.values({...pain}).some(val => val)){
|
||||||
Object.keys(pain).forEach(key => {
|
Object.keys(pain).forEach(key => {
|
||||||
if(pain[key] && key !== 'other' && key !== 'note') {
|
if(pain[key] && key !== 'other' && key !== 'note') {
|
||||||
painLabel.push(painLabels[key])
|
painLabel.push(painLabels[key])
|
||||||
@@ -147,7 +147,7 @@ export default class CycleDayOverView extends Component {
|
|||||||
},
|
},
|
||||||
mood: mood => {
|
mood: mood => {
|
||||||
let moodLabel = []
|
let moodLabel = []
|
||||||
if (mood && Object.values(mood).some(val => val)){
|
if (mood && Object.values({...mood}).some(val => val)){
|
||||||
Object.keys(mood).forEach(key => {
|
Object.keys(mood).forEach(key => {
|
||||||
if(mood[key] && key !== 'other' && key !== 'note') {
|
if(mood[key] && key !== 'other' && key !== 'note') {
|
||||||
moodLabel.push(moodLabels[key])
|
moodLabel.push(moodLabels[key])
|
||||||
|
|||||||
+540
-420
File diff suppressed because it is too large
Load Diff
+29
-1
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
#import <React/RCTBundleURLProvider.h>
|
#import <React/RCTBundleURLProvider.h>
|
||||||
#import <React/RCTRootView.h>
|
#import <React/RCTRootView.h>
|
||||||
|
#import <React/RCTPushNotificationManager.h>
|
||||||
|
|
||||||
@implementation AppDelegate
|
@implementation AppDelegate
|
||||||
|
|
||||||
@@ -19,7 +20,7 @@
|
|||||||
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
|
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
|
||||||
|
|
||||||
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
|
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
|
||||||
moduleName:@"drip"
|
moduleName:@"home"
|
||||||
initialProperties:nil
|
initialProperties:nil
|
||||||
launchOptions:launchOptions];
|
launchOptions:launchOptions];
|
||||||
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
|
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
|
||||||
@@ -32,4 +33,31 @@
|
|||||||
return YES;
|
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
|
@end
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node node_modules/react-native/local-cli/cli.js start",
|
"start": "node node_modules/react-native/local-cli/cli.js start",
|
||||||
"android": "react-native run-android",
|
"android": "react-native run-android",
|
||||||
|
"ios": "react-native run-ios --simulator=\"iPhone 8 Plus\"",
|
||||||
"log": "react-native log-android",
|
"log": "react-native log-android",
|
||||||
"test": "mocha --recursive --require @babel/register test && npm run lint",
|
"test": "mocha --recursive --require @babel/register test && npm run lint",
|
||||||
"test-watch": "mocha --recursive --require @babel/register --watch test",
|
"test-watch": "mocha --recursive --require @babel/register --watch test",
|
||||||
|
|||||||
Reference in New Issue
Block a user