summaryrefslogtreecommitdiff
path: root/client/components/map/chat_room_geoman.jsx
diff options
context:
space:
mode:
authorLogan Hunt <loganhunt@simponic.xyz>2022-04-01 16:31:24 -0600
committerLogan Hunt <loganhunt@simponic.xyz>2022-04-01 16:31:24 -0600
commit638b3e0750c61aded2d08dfad7680bfcff8abf9f (patch)
tree7076b5e03ed744fa9fdb023a7aa4a2a55c36bf47 /client/components/map/chat_room_geoman.jsx
parentdbb9eea25f80e7984a112409863be5191af5bf5e (diff)
downloadlocchat-638b3e0750c61aded2d08dfad7680bfcff8abf9f.tar.gz
locchat-638b3e0750c61aded2d08dfad7680bfcff8abf9f.zip
Fix some bugs
Diffstat (limited to 'client/components/map/chat_room_geoman.jsx')
-rw-r--r--client/components/map/chat_room_geoman.jsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/client/components/map/chat_room_geoman.jsx b/client/components/map/chat_room_geoman.jsx
index 07d0a4c..86b5c8a 100644
--- a/client/components/map/chat_room_geoman.jsx
+++ b/client/components/map/chat_room_geoman.jsx
@@ -51,7 +51,7 @@ const haversine = (p1, p2) => {
export const Geoman = ({ user, userPos, joinRoom }) => {
const context = useLeafletContext();
const api = useContext(ApiContext);
- let dontRedirect = true;
+ let dontRedirect = false;
const circleAndMarkerFromChatroom = (chatRoom) => {
const circle = new L.Circle(chatRoom.center, chatRoom.radius);
const marker = new L.Marker(chatRoom.center, { pmIgnore: !chatRoom.editable, icon });
@@ -64,7 +64,7 @@ export const Geoman = ({ user, userPos, joinRoom }) => {
return;
}
dontRedirect = false;
- }, 500);
+ }, 200);
});
marker.bindPopup(chatRoom.name || `Chat Room ${chatRoom.id}`);
marker.on('mouseover', (e) => {
@@ -158,7 +158,7 @@ export const Geoman = ({ user, userPos, joinRoom }) => {
const { lat: latitude, lng: longitude } = shape.layer.getLatLng();
const chatRoom = await api.post('/chat_rooms', {
- name: prompt("What's the name of the chat room?"),
+ name: prompt("What's the name of the chat room?\n(Chat rooms are deleted after 2 hours of inactivity)"),
latitude,
longitude,
radius: shape.layer.getRadius(),