Allow clicking links on Planex title

This commit is contained in:
Arnaud Vergnet 2020-09-21 19:15:44 +02:00
parent 8892095f8a
commit 64e643f5c6
2 changed files with 6 additions and 5 deletions

View file

@ -26,8 +26,8 @@ import i18n from 'i18n-js';
type PropsType = { type PropsType = {
visible: boolean, visible: boolean,
onDismiss: () => void, onDismiss: () => void,
title: string, title: string | React.Node,
message: string, message: string | React.Node,
}; };
class AlertDialog extends React.PureComponent<PropsType> { class AlertDialog extends React.PureComponent<PropsType> {

View file

@ -20,11 +20,12 @@
// @flow // @flow
import * as React from 'react'; import * as React from 'react';
import {withTheme} from 'react-native-paper'; import {Title, withTheme} from 'react-native-paper';
import i18n from 'i18n-js'; import i18n from 'i18n-js';
import {View} from 'react-native'; import {View} from 'react-native';
import {CommonActions} from '@react-navigation/native'; import {CommonActions} from '@react-navigation/native';
import {StackNavigationProp} from '@react-navigation/stack'; import {StackNavigationProp} from '@react-navigation/stack';
import Autolink from 'react-native-autolink';
import type {CustomThemeType} from '../../managers/ThemeManager'; import type {CustomThemeType} from '../../managers/ThemeManager';
import ThemeManager from '../../managers/ThemeManager'; import ThemeManager from '../../managers/ThemeManager';
import WebViewScreen from '../../components/Screens/WebViewScreen'; import WebViewScreen from '../../components/Screens/WebViewScreen';
@ -46,7 +47,7 @@ type PropsType = {
type StateType = { type StateType = {
dialogVisible: boolean, dialogVisible: boolean,
dialogTitle: string, dialogTitle: string | React.Node,
dialogMessage: string, dialogMessage: string,
currentGroup: PlanexGroupType, currentGroup: PlanexGroupType,
}; };
@ -285,7 +286,7 @@ class PlanexScreen extends React.Component<PropsType, StateType> {
showDialog = (title: string, message: string) => { showDialog = (title: string, message: string) => {
this.setState({ this.setState({
dialogVisible: true, dialogVisible: true,
dialogTitle: title, dialogTitle: <Autolink text={title} component={Title}/>,
dialogMessage: message, dialogMessage: message,
}); });
}; };