Add geolocation options
This commit is contained in:
@@ -24,6 +24,14 @@ const StreamEventMessage = 'message';
|
|||||||
const ContentTypeImageURL = 'image_url';
|
const ContentTypeImageURL = 'image_url';
|
||||||
const ContentTypeText = 'text';
|
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 {
|
class Odidere {
|
||||||
constructor({ document }) {
|
constructor({ document }) {
|
||||||
this.document = document;
|
this.document = document;
|
||||||
@@ -1051,6 +1059,7 @@ class Odidere {
|
|||||||
this.updateSendButtonState();
|
this.updateSendButtonState();
|
||||||
},
|
},
|
||||||
() => { },
|
() => { },
|
||||||
|
GeolocationOptions,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user