forked from MapComplete/MapComplete
chore: automated housekeeping...
This commit is contained in:
parent
6122d2a42c
commit
a2bcfead15
22 changed files with 448 additions and 86 deletions
|
|
@ -44,37 +44,37 @@ export class HistoryUtils {
|
|||
.filter((ch) => ch.oldValue !== ch.value)
|
||||
}
|
||||
|
||||
public static fullHistoryDiff(histories: OsmObject[][], onlyShowUsername?: Set<string>): {
|
||||
key: string;
|
||||
value?: string;
|
||||
oldValue?: string;
|
||||
public static fullHistoryDiff(
|
||||
histories: OsmObject[][],
|
||||
onlyShowUsername?: Set<string>
|
||||
): {
|
||||
key: string
|
||||
value?: string
|
||||
oldValue?: string
|
||||
step: OsmObject
|
||||
}[] {
|
||||
|
||||
const allDiffs: {
|
||||
key: string;
|
||||
value?: string;
|
||||
oldValue?: string;
|
||||
key: string
|
||||
value?: string
|
||||
oldValue?: string
|
||||
step: OsmObject
|
||||
}[] = []
|
||||
for (const history of histories) {
|
||||
const filtered = history.filter(
|
||||
(step) =>
|
||||
!onlyShowUsername ||
|
||||
onlyShowUsername?.has(step.tags["_last_edit:contributor"])
|
||||
!onlyShowUsername || onlyShowUsername?.has(step.tags["_last_edit:contributor"])
|
||||
)
|
||||
for (const step of filtered) {
|
||||
const diff: {
|
||||
key: string;
|
||||
value?: string;
|
||||
oldValue?: string;
|
||||
key: string
|
||||
value?: string
|
||||
oldValue?: string
|
||||
step: OsmObject
|
||||
}[] = HistoryUtils.tagHistoryDiff(step, history)
|
||||
allDiffs.push(...diff)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return allDiffs
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue