diff --git a/internal/service/static/main.js b/internal/service/static/main.js index 0f2628e..ae0a605 100644 --- a/internal/service/static/main.js +++ b/internal/service/static/main.js @@ -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, ); }