Add geolocation options
This commit is contained in:
@@ -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,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user