From 07e03e750ef4ecb68f570191d91f7d0aed19291c Mon Sep 17 00:00:00 2001 From: DragonSpirit Date: Sat, 12 Oct 2019 23:33:36 +0300 Subject: [PATCH 1/4] feat: Expand share dialog on iOS (#250) --- App/Screens/ShareScreen/ShareScreen.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/App/Screens/ShareScreen/ShareScreen.tsx b/App/Screens/ShareScreen/ShareScreen.tsx index 3c0180e9..cd93ad6e 100644 --- a/App/Screens/ShareScreen/ShareScreen.tsx +++ b/App/Screens/ShareScreen/ShareScreen.tsx @@ -15,7 +15,7 @@ // along with Sh**t! I Smoke. If not, see . import * as Sharing from 'expo-sharing'; -import React, { createRef, useEffect } from 'react'; +import React, { createRef, useEffect, useContext } from 'react'; import { Platform, Share, StyleSheet, View } from 'react-native'; import { captureRef } from 'react-native-view-shot'; import { NavigationInjectedProps } from 'react-navigation'; @@ -23,6 +23,7 @@ import { Button } from '../../components'; import { i18n } from '../../localization'; import * as theme from '../../util/theme'; import { ShareImage } from './ShareImage'; +import { ApiContext } from '../../stores'; type ShareScreenProps = NavigationInjectedProps; @@ -51,6 +52,7 @@ const styles = StyleSheet.create({ }); export function ShareScreen(props: ShareScreenProps) { + const { api } = useContext(ApiContext); const refViewShot = createRef(); const handleDismiss = () => { @@ -67,7 +69,11 @@ export function ShareScreen(props: ShareScreenProps) { if (Platform.OS === 'ios') { await Share.share({ - url: uri + url: uri, + title: i18n.t('home_share_title'), + message: i18n.t('home_share_message', { + cigarettes: api ? api.shootISmoke.cigarettes.toFixed(2) : 0 + }) }); } else { await Sharing.shareAsync(uri, { From dce3fb5bb780d9b364b357e04596ac15864c74fb Mon Sep 17 00:00:00 2001 From: DragonSpirit Date: Mon, 14 Oct 2019 12:40:58 +0300 Subject: [PATCH 2/4] update codestyle --- App/Screens/ShareScreen/ShareScreen.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/App/Screens/ShareScreen/ShareScreen.tsx b/App/Screens/ShareScreen/ShareScreen.tsx index cd93ad6e..66c5afcf 100644 --- a/App/Screens/ShareScreen/ShareScreen.tsx +++ b/App/Screens/ShareScreen/ShareScreen.tsx @@ -15,15 +15,15 @@ // along with Sh**t! I Smoke. If not, see . import * as Sharing from 'expo-sharing'; -import React, { createRef, useEffect, useContext } from 'react'; +import React, { createRef, useContext, useEffect } from 'react'; import { Platform, Share, StyleSheet, View } from 'react-native'; import { captureRef } from 'react-native-view-shot'; import { NavigationInjectedProps } from 'react-navigation'; import { Button } from '../../components'; import { i18n } from '../../localization'; +import { ApiContext } from '../../stores'; import * as theme from '../../util/theme'; import { ShareImage } from './ShareImage'; -import { ApiContext } from '../../stores'; type ShareScreenProps = NavigationInjectedProps; From dd2afa923f2b12546396520596f0da86ffd34638 Mon Sep 17 00:00:00 2001 From: DragonSpirit Date: Sun, 22 Dec 2019 00:23:40 +0300 Subject: [PATCH 3/4] #321 - Fix android statusbar translucency --- App/Screens/Screens.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/App/Screens/Screens.tsx b/App/Screens/Screens.tsx index 3e0ecd73..41fdc1fa 100644 --- a/App/Screens/Screens.tsx +++ b/App/Screens/Screens.tsx @@ -15,7 +15,7 @@ // along with Sh**t! I Smoke. If not, see . import React, { useContext } from 'react'; -import { View } from 'react-native'; +import { StatusBar, View } from 'react-native'; import { createAppContainer, CreateNavigatorConfig, @@ -139,5 +139,10 @@ export function Screens(): React.ReactElement { const stack = renderScreen(api, error); - return {stack}; + return ( + + + {stack} + + ); } From fedb8d7df8033065ea70666626293a54c6b0692c Mon Sep 17 00:00:00 2001 From: Nick <976313+DragonSpirit@users.noreply.github.com> Date: Sun, 29 Dec 2019 00:14:47 +0300 Subject: [PATCH 4/4] Update barStyle --- App/Screens/Screens.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/App/Screens/Screens.tsx b/App/Screens/Screens.tsx index 41fdc1fa..a6f937fc 100644 --- a/App/Screens/Screens.tsx +++ b/App/Screens/Screens.tsx @@ -141,7 +141,7 @@ export function Screens(): React.ReactElement { return ( - + {stack} );