Add geolocation options

This commit is contained in:
dwrz
2026-07-05 01:56:14 +00:00
parent 4a2ba2fa54
commit b1b708dd45

View File

@@ -24,6 +24,14 @@ const StreamEventMessage = 'message';
const ContentTypeImageURL = 'image_url';
const ContentTypeText = 'text';
// GeolocationOptions: coarse accuracy is sufficient for chat context.
// 30s cache avoids redundant GPS requests on repeated taps.
const GeolocationOptions = {
enableHighAccuracy: false,
timeout: 20_000,
maximumAge: 30_000,
};
class Odidere {
constructor({ document }) {
this.document = document;
@@ -1050,7 +1058,8 @@ class Odidere {
this.$location.classList.add('compose__action-btn--location', 'active');
this.updateSendButtonState();
},
() => {},
() => { },
GeolocationOptions,
);
}