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

fix: Fix android statusbar translucency #374

Merged
Merged
Changes from 1 commit
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
Next Next commit
feat: Expand share dialog on iOS (#250)
  • Loading branch information
DragonSpirit committed Oct 12, 2019
commit 07e03e750ef4ecb68f570191d91f7d0aed19291c
10 changes: 8 additions & 2 deletions App/Screens/ShareScreen/ShareScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@
// along with Sh**t! I Smoke. If not, see <http:https://www.gnu.org/licenses/>.

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';
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;

Expand Down Expand Up @@ -51,6 +52,7 @@ const styles = StyleSheet.create({
});

export function ShareScreen(props: ShareScreenProps) {
const { api } = useContext(ApiContext);
const refViewShot = createRef<View>();

const handleDismiss = () => {
Expand All @@ -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, {
Expand Down