@hedia/recommendation-screen 2.1.60 → 2.1.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -155,11 +155,6 @@ export default class RecommendationScreen extends React.Component<IRecommendatio
|
|
|
155
155
|
* It'll allow us to later remove the subscription.
|
|
156
156
|
*/
|
|
157
157
|
private appStateSubscription?;
|
|
158
|
-
/**
|
|
159
|
-
* A reference to the eventSubscription that'll be returned by BackHandler.addEventListener().
|
|
160
|
-
* It'll allow us to later remove the subscription.
|
|
161
|
-
*/
|
|
162
|
-
private backHandlerSubscription?;
|
|
163
158
|
/**
|
|
164
159
|
* Steps:
|
|
165
160
|
* 1. Call the super() method with the props.
|
|
@@ -249,14 +244,6 @@ export default class RecommendationScreen extends React.Component<IRecommendatio
|
|
|
249
244
|
* - Call the exitCallback prop callback function.
|
|
250
245
|
*/
|
|
251
246
|
onExit: () => void;
|
|
252
|
-
/**
|
|
253
|
-
* Callback to be executed by the back handler listener.
|
|
254
|
-
*
|
|
255
|
-
* Steps:
|
|
256
|
-
* 1. Call the onExist method
|
|
257
|
-
* 2. Return true so that the default behaviour is overwritten.
|
|
258
|
-
*/
|
|
259
|
-
onBackHandlerPress: () => boolean;
|
|
260
247
|
/**
|
|
261
248
|
* Hide the modal that shows attention messages.
|
|
262
249
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { AppState,
|
|
2
|
+
import { AppState, LogBox, StyleSheet, View } from "react-native";
|
|
3
3
|
import { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view";
|
|
4
4
|
import InfoBars from "./components/InfoBars";
|
|
5
5
|
import RecentInsulin from "./components/RecentInsulin";
|
|
@@ -61,11 +61,6 @@ export default class RecommendationScreen extends React.Component {
|
|
|
61
61
|
* It'll allow us to later remove the subscription.
|
|
62
62
|
*/
|
|
63
63
|
appStateSubscription;
|
|
64
|
-
/**
|
|
65
|
-
* A reference to the eventSubscription that'll be returned by BackHandler.addEventListener().
|
|
66
|
-
* It'll allow us to later remove the subscription.
|
|
67
|
-
*/
|
|
68
|
-
backHandlerSubscription;
|
|
69
64
|
/**
|
|
70
65
|
* Steps:
|
|
71
66
|
* 1. Call the super() method with the props.
|
|
@@ -137,7 +132,6 @@ export default class RecommendationScreen extends React.Component {
|
|
|
137
132
|
componentDidMount() {
|
|
138
133
|
if (!this.hasError) {
|
|
139
134
|
this.appStateSubscription = AppState.addEventListener(`change`, this.handleAppStateChange);
|
|
140
|
-
this.backHandlerSubscription = BackHandler.addEventListener(`hardwareBackPress`, this.onBackHandlerPress);
|
|
141
135
|
}
|
|
142
136
|
}
|
|
143
137
|
/**
|
|
@@ -155,7 +149,6 @@ export default class RecommendationScreen extends React.Component {
|
|
|
155
149
|
clearTimeout(this.timer);
|
|
156
150
|
}
|
|
157
151
|
this.appStateSubscription?.remove();
|
|
158
|
-
this.backHandlerSubscription?.remove();
|
|
159
152
|
}
|
|
160
153
|
/**
|
|
161
154
|
* Called immediately after updating occurs. This method is not called for the initial render.
|
|
@@ -229,17 +222,6 @@ export default class RecommendationScreen extends React.Component {
|
|
|
229
222
|
this.props.exitCallback();
|
|
230
223
|
}
|
|
231
224
|
};
|
|
232
|
-
/**
|
|
233
|
-
* Callback to be executed by the back handler listener.
|
|
234
|
-
*
|
|
235
|
-
* Steps:
|
|
236
|
-
* 1. Call the onExist method
|
|
237
|
-
* 2. Return true so that the default behaviour is overwritten.
|
|
238
|
-
*/
|
|
239
|
-
onBackHandlerPress = () => {
|
|
240
|
-
this.onExit();
|
|
241
|
-
return true;
|
|
242
|
-
};
|
|
243
225
|
/**
|
|
244
226
|
* Hide the modal that shows attention messages.
|
|
245
227
|
*
|