|
@@ -68,8 +68,8 @@ import { useGetIconsQuery, usePostSetToggleItem } from '@api/series';
|
|
|
import MarkerItem from './MarkerItem';
|
|
|
import {
|
|
|
usePostGetSettingsQuery,
|
|
|
+ usePostGetUsersCountQuery,
|
|
|
usePostGetUsersLocationQuery,
|
|
|
- usePostIsFeatureActiveQuery,
|
|
|
usePostUpdateLocationMutation
|
|
|
} from '@api/location';
|
|
|
import UserItem from './UserItem';
|
|
@@ -83,6 +83,7 @@ import MapButton from 'src/components/MapButton';
|
|
|
import { useAvatarStore } from 'src/stores/avatarVersionStore';
|
|
|
import _ from 'lodash';
|
|
|
import ScaleBar from 'src/components/ScaleBar';
|
|
|
+import MessagesDot from 'src/components/MessagesDot';
|
|
|
|
|
|
const defaultUserAvatar = require('assets/icon-user-share-location-solid.png');
|
|
|
const logo = require('assets/logo-ua.png');
|
|
@@ -271,7 +272,7 @@ const MapScreen: any = ({ navigation, route }: { navigation: any; route: any })
|
|
|
const netInfo = useConnection();
|
|
|
const { avatarVersion } = useAvatarStore();
|
|
|
|
|
|
- const { data: isFeatureActive } = usePostIsFeatureActiveQuery(token, !!token && isConnected);
|
|
|
+ const { data: usersOnMapCount } = usePostGetUsersCountQuery(token, !!token && isConnected);
|
|
|
const { data: regionsList } = useGetListRegionsQuery(isConnected);
|
|
|
const { data: countriesList } = useGetListCountriesQuery(isConnected);
|
|
|
const { data: dareList } = useGetListDareQuery(isConnected);
|
|
@@ -1644,6 +1645,7 @@ const MapScreen: any = ({ navigation, route }: { navigation: any; route: any })
|
|
|
showsHorizontalScrollIndicator={false}
|
|
|
contentContainerStyle={{
|
|
|
paddingHorizontal: 12,
|
|
|
+ paddingTop: 6,
|
|
|
gap: isSmallScreen ? 8 : 12,
|
|
|
flexDirection: 'row'
|
|
|
}}
|
|
@@ -1666,7 +1668,6 @@ const MapScreen: any = ({ navigation, route }: { navigation: any; route: any })
|
|
|
text="Series"
|
|
|
active={seriesFilter.visible}
|
|
|
/>
|
|
|
- {/* {isFeatureActive && isFeatureActive.active ? ( */}
|
|
|
{token ? (
|
|
|
<MapButton
|
|
|
onPress={() => {
|
|
@@ -1676,7 +1677,16 @@ const MapScreen: any = ({ navigation, route }: { navigation: any; route: any })
|
|
|
icon={NomadsIcon}
|
|
|
text="Nomads"
|
|
|
active={showNomads}
|
|
|
- />
|
|
|
+ >
|
|
|
+ {usersOnMapCount && usersOnMapCount?.count > 0 ? (
|
|
|
+ <MessagesDot
|
|
|
+ messagesCount={usersOnMapCount.count}
|
|
|
+ fullNumber={true}
|
|
|
+ right={-10}
|
|
|
+ top={-8}
|
|
|
+ />
|
|
|
+ ) : null}
|
|
|
+ </MapButton>
|
|
|
) : null}
|
|
|
</ScrollView>
|
|
|
</View>
|
|
@@ -1734,6 +1744,7 @@ const MapScreen: any = ({ navigation, route }: { navigation: any; route: any })
|
|
|
showNomads={showNomads}
|
|
|
isPublicView={false}
|
|
|
isLogged={token ? true : false}
|
|
|
+ usersOnMapCount={token && usersOnMapCount?.count ? usersOnMapCount.count : null}
|
|
|
/>
|
|
|
<EditModal
|
|
|
isVisible={isEditSlowModalVisible}
|