-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add feature to view Profile Picture in full screen #8483
Changes from 5 commits
3b49343
7fb0b2a
d74a1e8
5f24f5d
f8852d8
e91b09a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,8 @@ import * as ReportUtils from '../libs/reportUtils'; | |
import DateUtils from '../libs/DateUtils'; | ||
import * as Expensicons from '../components/Icon/Expensicons'; | ||
import MenuItem from '../components/MenuItem'; | ||
import AttachmentModal from '../components/AttachmentModal'; | ||
import PressableWithoutFocus from '../components/PressableWithoutFocus'; | ||
import * as Report from '../libs/actions/Report'; | ||
|
||
const matchType = PropTypes.shape({ | ||
|
@@ -98,11 +100,24 @@ const DetailsPage = (props) => { | |
{details ? ( | ||
<ScrollView> | ||
<View style={styles.pageWrapper}> | ||
<Avatar | ||
containerStyles={[styles.avatarLarge, styles.mb3]} | ||
imageStyles={[styles.avatarLarge]} | ||
source={details.avatar} | ||
/> | ||
<AttachmentModal | ||
headerTitle={isSMSLogin ? props.toLocalPhone(details.displayName) : details.displayName} | ||
sourceURL={details.avatarHighResolution} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can't we do that directly here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of this directly use |
||
isAuthTokenRequired | ||
> | ||
{({show}) => ( | ||
<PressableWithoutFocus | ||
style={styles.noOutline} | ||
onPress={show} | ||
> | ||
<Avatar | ||
containerStyles={[styles.avatarLarge, styles.mb3]} | ||
imageStyles={[styles.avatarLarge]} | ||
source={details.avatar} | ||
/> | ||
</PressableWithoutFocus> | ||
)} | ||
</AttachmentModal> | ||
{details.displayName && ( | ||
<Text style={[styles.displayName, styles.mb6]} numberOfLines={1}> | ||
{isSMSLogin ? props.toLocalPhone(details.displayName) : details.displayName} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to use the
avatarThumbnail
andavatar
properties. which means useavatarThumbnail
instead of avatar and storedetails.avatar
in theavatar
.Now use
avatarThumbnail
where the avatar was used.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@parasharrajat Do we want to do this change here? This might require massive code refactoring.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was expecting it to be done here because of the keys. But I don't mind another PR doing that. At last, I am fine with this as well if @Julesssss is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think that's okay.