diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 521957219..7e3b83c6e 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -471,13 +471,11 @@ lane :internal do end changelog = get_changelog - # TODO: disabled because we have just migrated this app to a new Google Play account and - # have not yet created credentials to talk to the upload API - # upload_to_play_store( - # aab: aab_path, - # track: "internal", - # version_name: last_tag - # ) + upload_to_play_store( + aab: aab_path, + track: "internal", + version_name: last_tag + ) upload_to_testflight( ipa: get_ipa_path, @@ -513,13 +511,11 @@ lane :beta do build_number = get_build_number( xcodeproj: XCODEPROJ ) # UI.message "Play Store: promoting build #{build_number} to beta track" - # TODO: disabled because we have just migrated this app to a new Google Play account and - # have not yet created credentials to talk to the upload API - # upload_to_play_store( - # version_code: build_number, - # track: "internal", - # track_promote_to: "beta" - # ) + upload_to_play_store( + version_code: build_number, + track: "internal", + track_promote_to: "beta" + ) UI.message "TestFlight: adding build #{build_number} to Open Beta group" add_build_to_testflight_beta_group( diff --git a/src/appConstants/classNames.ts b/src/appConstants/classNames.ts new file mode 100644 index 000000000..8cd578840 --- /dev/null +++ b/src/appConstants/classNames.ts @@ -0,0 +1,3 @@ +// Tailwind/NativeWind className for a standard 62x62 rounded thumbnail +// eslint-disable-next-line import/prefer-default-export +export const THUMBNAIL_CLASS = "w-[62px] h-[62px] rounded-lg"; diff --git a/src/components/Explore/ExploreV2/components/ExploreV2Header.tsx b/src/components/Explore/ExploreV2/components/ExploreV2Header.tsx index c67663fff..4e095d591 100644 --- a/src/components/Explore/ExploreV2/components/ExploreV2Header.tsx +++ b/src/components/Explore/ExploreV2/components/ExploreV2Header.tsx @@ -1,4 +1,5 @@ import { useNavigation } from "@react-navigation/native"; +import { THUMBNAIL_CLASS } from "appConstants/classNames"; import { Body1, Body3, @@ -22,8 +23,6 @@ import React from "react"; import { useCurrentUser, useTranslation } from "sharedHooks"; import colors from "styles/tailwindColors"; -const THUMBNAIL_CLASS = "w-[62px] h-[62px] rounded-lg"; - function subjectLabel( subject: ExploreV2Subject | null, t: TFunction ): string { if ( !subject ) { return t( "All-organisms" ); } switch ( subject.type ) { diff --git a/src/components/Journal/PostListItem.tsx b/src/components/Journal/PostListItem.tsx index 291dd9501..ac9433b7d 100644 --- a/src/components/Journal/PostListItem.tsx +++ b/src/components/Journal/PostListItem.tsx @@ -1,4 +1,5 @@ import type { ApiPost } from "api/types"; +import { THUMBNAIL_CLASS } from "appConstants/classNames"; import { Body1, List2, @@ -29,7 +30,7 @@ const PostListItem = ( { {item.parent.icon_url && ( diff --git a/src/components/Notifications/ObservationIcon.tsx b/src/components/Notifications/ObservationIcon.tsx index d164d97b4..0a9785574 100644 --- a/src/components/Notifications/ObservationIcon.tsx +++ b/src/components/Notifications/ObservationIcon.tsx @@ -1,4 +1,5 @@ import type { ApiObservation } from "api/types"; +import { THUMBNAIL_CLASS } from "appConstants/classNames"; import classnames from "classnames"; import { INatIcon, @@ -20,10 +21,8 @@ const ObservationIcon = ( { return ( { const { t, i18n } = useTranslation( ); - const iconClassName = "w-[62px] h-[62px] rounded-lg bg-white mr-3"; + const iconClassName = classnames( THUMBNAIL_CLASS, "bg-white mr-3" ); const displayBriefcase = ( ) => ( { const realm = useRealm( ); - const { isConnected } = useNetInfo( ); - const navigation = useNavigation( ); const { t } = useTranslation( ); const { remoteUser, isLoading, refetchUserMe, } = useUserMe( { updateRealm: false } ); - const { - setIsDefaultMode, - } = useLayoutPrefs(); const [settings, setSettings] = useState( {} ); const [isSaving, setIsSaving] = useState( false ); - const [showingWebViewSettings, setShowingWebViewSettings] = useState( false ); - useFocusEffect( - useCallback( () => { - if ( showingWebViewSettings ) { - // When we get back from the webview of settings - in case the user updated their profile - // photo or other details - refetchUserMe(); - setShowingWebViewSettings( false ); - } - }, [showingWebViewSettings, refetchUserMe] ), - ); - - const confirmInternetConnection = useCallback( ( ) => { - if ( !isConnected ) { - Alert.alert( - t( "Internet-Connection-Required" ), - t( "Please-try-again-when-you-are-connected-to-the-internet" ), - ); - } - return isConnected; - }, [t, isConnected] ); - - const queryClient = useQueryClient(); + const navigateToAccountSettings = useNavigateToAccountSettings( { onFinish: refetchUserMe } ); useEffect( () => { if ( remoteUser ) { @@ -81,18 +40,6 @@ const LoggedInDefaultSettings = ( ) => { } }, [remoteUser, realm] ); - // Listen for the webview to finish so we can fetch the updates users/me - // response - useEffect( ( ) => { - const listener = EventRegister.addEventListener( - FINISHED_WEB_SETTINGS, - refetchUserMe, - ); - return ( ) => { - EventRegister?.removeEventListener( listener ); - }; - }, [refetchUserMe] ); - return ( {( isSaving || isLoading ) && ( @@ -143,41 +90,7 @@ const LoggedInDefaultSettings = ( ) => {