fix: purge stale 1-tap mobile pins, make remove pin button bold and prominent, and bust service worker cache
This commit is contained in:
+14
-2
@@ -124,7 +124,13 @@
|
||||
communityReports = JSON.parse(stored);
|
||||
// Automatically prune any unverified test marks or pins without photo proof
|
||||
const beforeCount = communityReports.length;
|
||||
communityReports = communityReports.filter(r => r && r.photoUrl && !r.id.startsWith('usr-pin-'));
|
||||
communityReports = communityReports.filter(r =>
|
||||
r &&
|
||||
r.photoUrl &&
|
||||
!r.id.startsWith('usr-pin-') &&
|
||||
r.notes !== '1-Tap Mobile Driver Pin' &&
|
||||
r.type !== 'Fixed ALPR Camera'
|
||||
);
|
||||
if (communityReports.length !== beforeCount) {
|
||||
localStorage.setItem(STORAGE_KEY_REPORTS, JSON.stringify(communityReports));
|
||||
}
|
||||
@@ -138,7 +144,13 @@
|
||||
|
||||
function clearUnverifiedReports() {
|
||||
try {
|
||||
communityReports = communityReports.filter(r => r && r.photoUrl && !r.id.startsWith('usr-pin-'));
|
||||
communityReports = communityReports.filter(r =>
|
||||
r &&
|
||||
r.photoUrl &&
|
||||
!r.id.startsWith('usr-pin-') &&
|
||||
r.notes !== '1-Tap Mobile Driver Pin' &&
|
||||
r.type !== 'Fixed ALPR Camera'
|
||||
);
|
||||
localStorage.setItem(STORAGE_KEY_REPORTS, JSON.stringify(communityReports));
|
||||
Object.keys(cameraMetadata).forEach(id => {
|
||||
if (id.startsWith('usr-pin-') || !cameraMetadata[id].photoUrl) {
|
||||
|
||||
Reference in New Issue
Block a user