Adjust European short trip heuristic from >3 days to >1 day to correctly detect when user has returned home from European trips. This fixes the April 29-30, 2023 case where the location incorrectly showed "Sankt Georg, Hamburg" instead of "Bristol" when the user was free (no events scheduled) after the foss-north trip ended on April 27. The previous logic required more than 3 days to pass before assuming return home from European countries, but for short European trips by rail/ferry, users typically return within 1-2 days. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
27 lines
1.2 KiB
JavaScript
27 lines
1.2 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
const path = require("path");
|
|
const fsScandir = require("@nodelib/fs.scandir");
|
|
class Settings {
|
|
constructor(_options = {}) {
|
|
this._options = _options;
|
|
this.basePath = this._getValue(this._options.basePath, undefined);
|
|
this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY);
|
|
this.deepFilter = this._getValue(this._options.deepFilter, null);
|
|
this.entryFilter = this._getValue(this._options.entryFilter, null);
|
|
this.errorFilter = this._getValue(this._options.errorFilter, null);
|
|
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep);
|
|
this.fsScandirSettings = new fsScandir.Settings({
|
|
followSymbolicLinks: this._options.followSymbolicLinks,
|
|
fs: this._options.fs,
|
|
pathSegmentSeparator: this._options.pathSegmentSeparator,
|
|
stats: this._options.stats,
|
|
throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink
|
|
});
|
|
}
|
|
_getValue(option, value) {
|
|
return option !== null && option !== void 0 ? option : value;
|
|
}
|
|
}
|
|
exports.default = Settings;
|