Browse Source

Use Image instead of avatar

This removes round corners
Arnaud Vergnet 1 year ago
parent
commit
835656bb30
2 changed files with 10 additions and 7 deletions
  1. 3
    3
      src/screens/About/AboutScreen.js
  2. 7
    4
      src/screens/Home/FeedItemScreen.js

+ 3
- 3
src/screens/About/AboutScreen.js View File

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

+ 7
- 4
src/screens/Home/FeedItemScreen.js View File

@@ -1,8 +1,8 @@
1 1
 // @flow
2 2
 
3 3
 import * as React from 'react';
4
-import {Linking} from 'react-native';
5
-import {Avatar, Card, Text, withTheme} from 'react-native-paper';
4
+import {Linking, Image} from 'react-native';
5
+import {Card, Text, withTheme} from 'react-native-paper';
6 6
 import Autolink from 'react-native-autolink';
7 7
 import {StackNavigationProp} from '@react-navigation/stack';
8 8
 import MaterialHeaderButtons, {
@@ -78,10 +78,13 @@ class FeedItemScreen extends React.Component<PropsType> {
78 78
           title={pageSource.name}
79 79
           subtitle={this.date}
80 80
           left={(): React.Node => (
81
-            <Avatar.Image
81
+            <Image
82 82
               size={48}
83 83
               source={pageSource.icon}
84
-              style={{backgroundColor: 'transparent'}}
84
+              style={{
85
+                width: 48,
86
+                height: 48,
87
+              }}
85 88
             />
86 89
           )}
87 90
         />

Loading…
Cancel
Save