[🐴] DM button on profile (#4097)
* add profile button * separate out button to component * normalise subscribe to labeller button size * infinite staletime * use Link rather than Button and change icon * adjust icon position
This commit is contained in:
		
							parent
							
								
									2414559b80
								
							
						
					
					
						commit
						24f8794d4d
					
				
					 5 changed files with 125 additions and 42 deletions
				
			
		|  | @ -1,41 +1,42 @@ | |||
| import React, {memo} from 'react' | ||||
| import {TouchableOpacity} from 'react-native' | ||||
| import {AppBskyActorDefs} from '@atproto/api' | ||||
| import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' | ||||
| import {msg, Trans} from '@lingui/macro' | ||||
| import {useLingui} from '@lingui/react' | ||||
| import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' | ||||
| import {useQueryClient} from '@tanstack/react-query' | ||||
| import * as Toast from 'view/com/util/Toast' | ||||
| import {EventStopper} from 'view/com/util/EventStopper' | ||||
| import {useSession} from 'state/session' | ||||
| import * as Menu from '#/components/Menu' | ||||
| import {useTheme} from '#/alf' | ||||
| import {usePalette} from 'lib/hooks/usePalette' | ||||
| 
 | ||||
| import {logger} from '#/logger' | ||||
| import {useAnalytics} from 'lib/analytics/analytics' | ||||
| import {HITSLOP_10} from 'lib/constants' | ||||
| import {usePalette} from 'lib/hooks/usePalette' | ||||
| import {makeProfileLink} from 'lib/routes/links' | ||||
| import {shareUrl} from 'lib/sharing' | ||||
| import {toShareUrl} from 'lib/strings/url-helpers' | ||||
| import {makeProfileLink} from 'lib/routes/links' | ||||
| import {useAnalytics} from 'lib/analytics/analytics' | ||||
| import {Shadow} from 'state/cache/types' | ||||
| import {useModalControls} from 'state/modals' | ||||
| import {ReportDialog, useReportDialogControl} from '#/components/ReportDialog' | ||||
| import { | ||||
|   RQKEY as profileQueryKey, | ||||
|   useProfileBlockMutationQueue, | ||||
|   useProfileFollowMutationQueue, | ||||
|   useProfileMuteMutationQueue, | ||||
| } from 'state/queries/profile' | ||||
| import {useSession} from 'state/session' | ||||
| import {EventStopper} from 'view/com/util/EventStopper' | ||||
| import * as Toast from 'view/com/util/Toast' | ||||
| import {useTheme} from '#/alf' | ||||
| import {ArrowOutOfBox_Stroke2_Corner0_Rounded as Share} from '#/components/icons/ArrowOutOfBox' | ||||
| import {Flag_Stroke2_Corner0_Rounded as Flag} from '#/components/icons/Flag' | ||||
| import {ListSparkle_Stroke2_Corner0_Rounded as List} from '#/components/icons/ListSparkle' | ||||
| import {Mute_Stroke2_Corner0_Rounded as Mute} from '#/components/icons/Mute' | ||||
| import {SpeakerVolumeFull_Stroke2_Corner0_Rounded as Unmute} from '#/components/icons/Speaker' | ||||
| import {Flag_Stroke2_Corner0_Rounded as Flag} from '#/components/icons/Flag' | ||||
| import {PeopleRemove2_Stroke2_Corner0_Rounded as UserMinus} from '#/components/icons/PeopleRemove2' | ||||
| import {PersonCheck_Stroke2_Corner0_Rounded as PersonCheck} from '#/components/icons/PersonCheck' | ||||
| import {PersonX_Stroke2_Corner0_Rounded as PersonX} from '#/components/icons/PersonX' | ||||
| import {PeopleRemove2_Stroke2_Corner0_Rounded as UserMinus} from '#/components/icons/PeopleRemove2' | ||||
| import {PlusLarge_Stroke2_Corner0_Rounded as Plus} from '#/components/icons/Plus' | ||||
| import {logger} from '#/logger' | ||||
| import {Shadow} from 'state/cache/types' | ||||
| import {SpeakerVolumeFull_Stroke2_Corner0_Rounded as Unmute} from '#/components/icons/Speaker' | ||||
| import * as Menu from '#/components/Menu' | ||||
| import * as Prompt from '#/components/Prompt' | ||||
| import {ReportDialog, useReportDialogControl} from '#/components/ReportDialog' | ||||
| 
 | ||||
| let ProfileMenu = ({ | ||||
|   profile, | ||||
|  | @ -192,9 +193,8 @@ let ProfileMenu = ({ | |||
|                     flexDirection: 'row', | ||||
|                     alignItems: 'center', | ||||
|                     justifyContent: 'center', | ||||
|                     paddingVertical: 10, | ||||
|                     padding: 8, | ||||
|                     borderRadius: 50, | ||||
|                     paddingHorizontal: 16, | ||||
|                   }, | ||||
|                   pal.btn, | ||||
|                 ]}> | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue