Compare commits

..

No commits in common. "835656bb30af34ed6bd0d24c8b701694fa01ed20" and "6ec87821e8b5da10f9e5d859afd6bab0809613f5" have entirely different histories.

2 changed files with 13 additions and 16 deletions

View file

@ -1,7 +1,7 @@
// @flow
import * as React from 'react';
import {FlatList, Linking, Platform, Image} from 'react-native';
import {FlatList, Linking, Platform} from 'react-native';
import i18n from 'i18n-js';
import {Avatar, Card, List, Title, withTheme} from 'react-native-paper';
import {StackNavigationProp} from '@react-navigation/stack';
@ -222,10 +222,10 @@ class AboutScreen extends React.Component<PropsType> {
title="Campus"
subtitle={packageJson.version}
left={(iconProps: CardTitleIconPropsType): React.Node => (
<Image
<Avatar.Image
size={iconProps.size}
source={APP_LOGO}
style={{width: iconProps.size, height: iconProps.size}}
style={{backgroundColor: 'transparent'}}
/>
)}
/>

View file

@ -1,8 +1,8 @@
// @flow
import * as React from 'react';
import {Linking, Image} from 'react-native';
import {Card, Text, withTheme} from 'react-native-paper';
import {Linking} from 'react-native';
import {Avatar, Card, Text, withTheme} from 'react-native-paper';
import Autolink from 'react-native-autolink';
import {StackNavigationProp} from '@react-navigation/stack';
import MaterialHeaderButtons, {
@ -12,14 +12,16 @@ import CustomTabBar from '../../components/Tabbar/CustomTabBar';
import type {FeedItemType} from './HomeScreen';
import CollapsibleScrollView from '../../components/Collapsible/CollapsibleScrollView';
import ImageGalleryButton from '../../components/Media/ImageGalleryButton';
import NewsSourcesConstants from '../../constants/NewsSourcesConstants';
import type {NewsSourceType} from '../../constants/NewsSourcesConstants';
type PropsType = {
navigation: StackNavigationProp,
route: {params: {data: FeedItemType, date: string}},
};
const ICON_AMICALE = require('../../../assets/amicale.png');
const NAME_AMICALE = 'Amicale INSA Toulouse';
/**
* Class defining a feed item page.
*/
@ -70,21 +72,16 @@ class FeedItemScreen extends React.Component<PropsType> {
const {navigation} = this.props;
const hasImage =
this.displayData.image !== '' && this.displayData.image != null;
const pageSource: NewsSourceType =
NewsSourcesConstants[this.displayData.page_id];
return (
<CollapsibleScrollView style={{margin: 5}} hasTab>
<Card.Title
title={pageSource.name}
title={NAME_AMICALE}
subtitle={this.date}
left={(): React.Node => (
<Image
<Avatar.Image
size={48}
source={pageSource.icon}
style={{
width: 48,
height: 48,
}}
source={ICON_AMICALE}
style={{backgroundColor: 'transparent'}}
/>
)}
/>