Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/tech due/2.13.x #75

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion App.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ export default class App extends React.Component {
_handleAppStateChange = async (nextAppState) => {
// Get remote config when app enters foreground
if (this.state.appState === 'active' && nextAppState.match(/inactive|background/)) {
SplashScreen.show();

} else if (this.state.appState.match(/inactive|background/) && nextAppState === 'active') {
SplashScreen.show();
getRemoteConfig(_getRemoteConfigCallback);
setBundlesTimer()
const loginStatus = await autoLogin();
Expand Down
16 changes: 8 additions & 8 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ android {
applicationId "digital.telenor.panacea"
minSdkVersion 16
targetSdkVersion 26
versionCode 22
versionName "2.12.0"
versionCode 26
versionName "2.13.1"
ndk {
abiFilters "armeabi-v7a", "x86"
}
Expand Down Expand Up @@ -190,15 +190,15 @@ dependencies {
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
implementation "com.google.firebase:firebase-analytics:15.0.2"
implementation "com.google.firebase:firebase-analytics:16.0.4"
implementation('com.crashlytics.sdk.android:crashlytics:2.9.1@aar') {
transitive = true
}
implementation "com.google.firebase:firebase-perf:15.1.0"
implementation "com.google.firebase:firebase-crash:15.0.2"
implementation "com.google.firebase:firebase-config:15.0.2"
implementation "com.google.firebase:firebase-messaging:15.0.2"
implementation "com.google.firebase:firebase-invites:15.0.1"
implementation "com.google.firebase:firebase-perf:16.1.2"
implementation "com.google.firebase:firebase-crash:16.2.1"
implementation "com.google.firebase:firebase-config:16.0.1"
implementation "com.google.firebase:firebase-messaging:17.3.3"
implementation "com.google.firebase:firebase-invites:16.0.4"

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ protected String getMainComponentName() {

@Override
protected void onCreate(Bundle savedInstanceState) {
SplashScreen.show(this);
SplashScreen.show(this, true);
super.onCreate(savedInstanceState);
}
}
Binary file modified android/app/src/main/res/drawable-land-hdpi/launch_screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-land-ldpi/launch_screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-land-mdpi/launch_screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-land-xxhdpi/launch_screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-port-hdpi/launch_screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-port-ldpi/launch_screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-port-mdpi/launch_screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions android/app/src/main/res/drawable/launch_screen_bitmap.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" android:opacity="opaque">
<item>
<shape android:shape="rectangle">
<solid android:color="@android:color/white" />
</shape>
</item>
<item>
<bitmap
android:orientation="vertical" android:layout_width="match_parent"
Expand Down
11 changes: 8 additions & 3 deletions android/app/src/main/res/layout/launch_screen.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/launch_screen">
android:layout_width="match_parent"
android:background="@color/splashBackground"
android:layout_height="match_parent">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitXY"
android:src="@drawable/launch_screen" />
</LinearLayout>
2 changes: 1 addition & 1 deletion android/app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<item name="splashBackground" type="color">#FC9CA8</item>
<item name="splashBackground" type="color">#ffffff</item>
</resources>
3 changes: 3 additions & 0 deletions android/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowExitAnimation">@android:anim/fade_out</item>
<item name="android:windowBackground">@drawable/launch_screen_bitmap</item>
<item name="android:windowLightStatusBar">true</item>
<item name="android:statusBarColor">#ffffff</item>
<item name="colorPrimaryDark">#400101</item>
</style>
</resources>
2 changes: 1 addition & 1 deletion app/components/AppHeader/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import {colors} from "../../config/colors";

export default StyleSheet.create({
header: {
backgroundColor: colors.rosa
backgroundColor: colors.lipstick
}
});
3 changes: 2 additions & 1 deletion app/config/colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ export const colors = {
duskBlue: "#214577",
brownishGrey: "#646464",
whiteTwo: "#f6f6f6",
black: "#000000"
black: "#000000",
lipstick: "#bf1d42"
};
2 changes: 1 addition & 1 deletion app/config/fonts.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export const textStyles = StyleSheet.create({
lineHeight: 28,
letterSpacing: 0,
textAlign: "left",
color: colors.rosa
color: colors.lipstick
},
textStyle6: {
// fontFamily: "Nudista",
Expand Down
2 changes: 1 addition & 1 deletion app/containers/GDPR/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default StyleSheet.create({
justifyContent: 'center',
height: 60,
borderRadius: 5,
backgroundColor: colors.rosa
backgroundColor: colors.lipstick
},
privacyTextContainer: {
flex: 1,
Expand Down
15 changes: 11 additions & 4 deletions app/containers/Home/Home.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const Home = props => {
</View>
) : null}
<ReferralMessageModal isDialogVisible={showReferralMessage} goBack={closeReferralMessage} itemDescription={'1 GB'} closeButtonLabel={'Much Appreciated!'} />
<Header noShadow androidStatusBarColor={'rgba(0,0,0,0.5)'} style={styles.header}>
<Header noShadow androidStatusBarColor={'rgba(0,0,0,0.95)'} style={styles.header}>
<Left></Left>
<Body>
<Title style={textStyles.textStyle11}>
Expand Down Expand Up @@ -82,7 +82,7 @@ const Home = props => {
</Body>
</ListItem>
</List>
<RoundedBorder color={colors.rosa} />
<RoundedBorder color={colors.lipstick} />
{ specialOffer ? (
<View style={styles.specialOfferContainer}>
<View style={styles.specialOffer}>
Expand Down Expand Up @@ -142,8 +142,15 @@ const ReferralFooterContainer = compose(
lifecycle({
async componentDidMount() {
const { referralId, setReferralLink, profile } = this.props;
const referralLink = await getReferralLink(referralId, profile.data.name)
setReferralLink(referralLink);
try {
const referralLink = await getReferralLink(referralId, profile.data.name)
console.log('ref link', referralLink)
setReferralLink(referralLink);
} catch (err) {
console.log('Failed to create referral link', err);
alert('Failed to create referral link.')
}

}
}),
branch(({ referralLink}) => referralLink === '', renderNothing)
Expand Down
2 changes: 1 addition & 1 deletion app/containers/Home/Referral.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const Referral = (props) => {
const { referralLink, name } = props;

return (
<TouchableOpacity style={{ flex: 1, flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', paddingHorizontal: 30, paddingVertical: 12, backgroundColor: colors.rosa }} onPress={() => {
<TouchableOpacity style={{ flex: 1, flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', paddingHorizontal: 30, paddingVertical: 12, backgroundColor: colors.lipstick }} onPress={() => {
Share.share({
title: 'Share the love',
message: `Hi there, just sending you the share link to the awesome service I mentioned.\n${name ? `Sincerely ${name}.` : '' }${ Platform.OS === 'ios' ? '' : `\n${referralLink}`}`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default StyleSheet.create({
button: {
height: 60,
borderRadius: 5,
backgroundColor: colors.rosa,
backgroundColor: colors.lipstick,
justifyContent: 'center'
}
});
8 changes: 4 additions & 4 deletions app/containers/Home/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default StyleSheet.create({
backgroundColor: colors.whiteTwo
},
header: {
backgroundColor: colors.rosa,
backgroundColor: colors.lipstick,
borderBottomWidth: 0,
zIndex: 1
},
Expand All @@ -20,7 +20,7 @@ export default StyleSheet.create({
flex: 1
},
topContentContainer: {
backgroundColor: colors.rosa,
backgroundColor: colors.lipstick,
zIndex: 1
},
staticOfferContainer: {
Expand Down Expand Up @@ -58,7 +58,7 @@ export default StyleSheet.create({
width: 220,
height: 60,
borderRadius: 5,
backgroundColor: colors.rosa,
backgroundColor: colors.lipstick,
paddingHorizontal: 40,
flexDirection: 'row',
justifyContent: 'center'
Expand All @@ -68,7 +68,7 @@ export default StyleSheet.create({
justifyContent: 'center'
},
emptyOfferIcon: {
color: colors.rosa
color: colors.lipstick
},
footer: {
padding: 0
Expand Down
11 changes: 7 additions & 4 deletions app/containers/OnBoarding/OnBoarding.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@ const OnBoarding = (props) => {
const { showTermsAndConditions, signIn, style, textStyles, androidStatusBarColor, loginButtonLabel, termsAndConditionsLabel, onBoardingDescriptionLabel, loginButtonIconName, title } = props;
return (
<Container>
<Image source={require('../../../assets/sweets.jpg')} style={style.containerImage} />
<Header androidStatusBarColor={androidStatusBarColor} style={style.header} noShadow>
<Image source={require('../../../assets/bg.png')} style={style.containerImage} />
<View style={{ position: 'absolute', bottom: 5, right: 5 }}>
<AppVersion />
</View>
<Header androidStatusBarColor={androidStatusBarColor} style={style.header} noShadow transparent>
<Body style={style.headerContent}>
<Title style={textStyles.textStyle11}>{title} <AppVersion /> </Title>
<Title style={textStyles.textStyle11}>{title}</Title>
</Body>
</Header>
<Content contentContainerStyle={style.contentContainer}>
Expand Down Expand Up @@ -51,7 +54,7 @@ OnBoarding.propTypes = {
};

OnBoarding.defaultProps = {
androidStatusBarColor: 'rgba(0,0,0,0.5)',
androidStatusBarColor: 'rgba(0,0,0,0.95)',
style: styles,
textStyles,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default StyleSheet.create({
button: {
height: 60,
borderRadius: 5,
backgroundColor: colors.rosa,
backgroundColor: colors.lipstick,
justifyContent: 'center'
}
});
2 changes: 1 addition & 1 deletion app/containers/Payment/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default StyleSheet.create({
width: '100%',
height: 60,
borderRadius: 5,
backgroundColor: colors.rosa,
backgroundColor: colors.lipstick,
justifyContent: 'center'
}
});
2 changes: 1 addition & 1 deletion app/containers/Settings/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const Settings = props => {
<Content>
<View style={styles.topButtonContainer}>
<TouchableOpacity onPress={showUserDetails} style={styles.flex}>
<IconButton iconName="person" label="Personal details" color={colors.rosa} />
<IconButton iconName="person" label="Personal details" color={colors.lipstick} />
</TouchableOpacity>
<TouchableOpacity onPress={showPrivacy} style={styles.flex}>
<IconButton iconName="shirt" label="Privacy" color={colors.duskBlue} />
Expand Down
2 changes: 1 addition & 1 deletion app/containers/UserDetailsEdit/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default StyleSheet.create({
borderRadius: 0
},
submitButton: {
backgroundColor: colors.rosa
backgroundColor: colors.lipstick
},
cancelButton: {
backgroundColor: colors.white
Expand Down
7 changes: 5 additions & 2 deletions app/helper/referral.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ import { AsyncStorage } from "react-native";
import URI from 'urijs';

export const getReferralLink = async (uid, name) => {
let shareLink = `https://digital.telenor.panacea/invite?uid=${encodeURI(uid)}`;

console.log('1');
let shareLink = `https://digital.telenor.panacea/invite?uid=${encodeURI(uid)}`;
console.log('2');
if (name) {
shareLink += `&name=${encodeURI(name)}`
}
console.log('3');

const link = new firebase.links.DynamicLink(shareLink, 'wm3db.app.goo.gl')
.ios.setBundleId('digital.telenor.panacea')
Expand All @@ -17,7 +20,7 @@ export const getReferralLink = async (uid, name) => {
.social.setImageUrl('https://picsum.photos/400/300?image=0')
.social.setTitle('FREE DATA!!!')
.social.setDescriptionText('Join our service and get 1 GB free data on signup.');

console.log('4');
// link.android.setMinimumVersion(14);

return firebase.links().createShortDynamicLink(link, 'UNGUESSABLE')
Expand Down
Binary file added assets/bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/splash.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions ios/PanaceaReactNativeClient-tvOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.12.0</string>
<string>2.13.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>36</string>
<string>38</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
Expand Down
4 changes: 2 additions & 2 deletions ios/PanaceaReactNativeClient-tvOSTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>2.12.0</string>
<string>2.13.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>36</string>
<string>38</string>
</dict>
</plist>
4 changes: 2 additions & 2 deletions ios/PanaceaReactNativeClient.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1620,7 +1620,7 @@
CODE_SIGN_ENTITLEMENTS = PanaceaReactNativeClient/PanaceaReactNativeClient.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 36;
CURRENT_PROJECT_VERSION = 38;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = G4VMYY2CK5;
FRAMEWORK_SEARCH_PATHS = (
Expand Down Expand Up @@ -1660,7 +1660,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 36;
CURRENT_PROJECT_VERSION = 38;
DEVELOPMENT_TEAM = G4VMYY2CK5;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand Down
4 changes: 2 additions & 2 deletions ios/PanaceaReactNativeClient/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.12.0</string>
<string>2.13.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -44,7 +44,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>36</string>
<string>38</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
Expand Down
4 changes: 2 additions & 2 deletions ios/PanaceaReactNativeClientTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>2.12.0</string>
<string>2.13.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>36</string>
<string>38</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "PanaceaReactNativeClient",
"version": "2.12.0",
"version": "2.13.1",
"private": true,
"devDependencies": {
"@babel/core": "^7.0.0",
Expand Down