Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions mobile/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"expo": {
"name": "VoteMonitor",
"slug": "vote-monitor",
"version": "2.5.6",
"version": "2.6.0",
"scheme": "mobile",
"orientation": "portrait",
"icon": "./assets/icons/icon.png",
Expand All @@ -18,7 +18,7 @@
"ios": {
"supportsTablet": true,
"bundleIdentifier": "org.commitglobal.votemonitor",
"buildNumber": "150",
"buildNumber": "156",
"config": {
"usesNonExemptEncryption": false
},
Expand All @@ -31,7 +31,7 @@
},
"android": {
"softwareKeyboardLayoutMode": "pan",
"versionCode": 148,
"versionCode": 156,
"adaptiveIcon": {
"foregroundImage": "./assets/icons/adaptive-icon.png",
"backgroundColor": "#FDD20C"
Expand All @@ -58,6 +58,9 @@
"url": "https://u.expo.dev/93e17628-ddcd-4e67-849c-b356a18a6082"
},
"newArchEnabled": false,
"experiments": {
"reactCompiler": true
},
"plugins": [
"expo-router",
[
Expand Down Expand Up @@ -100,9 +103,6 @@
]
},
"android": {
"compileSdkVersion": 35,
"targetSdkVersion": 35,
"buildToolsVersion": "35.0.0",
"edgeToEdgeEnabled": false,
"packagingOptions": {
"pickFirst": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,21 @@ const Index = () => {
]
.filter(Boolean)
.join(" ");

return {
address: fullAddress,
latitude: selectedPollingStation.latitude,
longitude: selectedPollingStation.longitude,
const options = {
dialogTitle: t("navigate_to_polling_station.title"),
dialogMessage: t("navigate_to_polling_station.description"),
cancelText: t("navigate_to_polling_station.actions.cancel"),
cancelText: t("navigate_to_polling_station.cancel"),
};

if (selectedPollingStation.latitude && selectedPollingStation.longitude) {
return {
latitude: selectedPollingStation.latitude,
longitude: selectedPollingStation.longitude,
...options,
};
}

return { ...options, address: fullAddress };
}, [selectedPollingStation, visits]);

const handleCopyPollingStationInfo = async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const QuickReport = () => {
<Button
preset="outlined"
backgroundColor="white"
onPress={router.push.bind(null, "/report-issue")}
onPress={() => router.push("/report-issue")}
>
{t("list.add")}
</Button>
Expand Down Expand Up @@ -145,7 +145,7 @@ const QuickReportContent = ({
width="100%"
height="100%"
textStyle={{ textAlign: "center" }}
onPress={router.push.bind(null, "/report-issue")}
onPress={() => router.push("/report-issue")}
backgroundColor="white"
>
{t("list.add")}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useQueryClient } from "@tanstack/react-query";
import { Buffer } from "buffer";
import * as Crypto from "expo-crypto";
import * as DocumentPicker from "expo-document-picker";
import * as FileSystem from "expo-file-system";
import * as FileSystem from "expo-file-system/legacy";
import { router, useLocalSearchParams } from "expo-router";
import { useEffect, useMemo, useRef, useState } from "react";
import { useForm } from "react-hook-form";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useQueryClient } from "@tanstack/react-query";
import { Buffer } from "buffer";
import * as Crypto from "expo-crypto";
import * as DocumentPicker from "expo-document-picker";
import * as FileSystem from "expo-file-system";
import * as FileSystem from "expo-file-system/legacy";
import { router, useLocalSearchParams } from "expo-router";
import { useEffect, useMemo, useRef, useState } from "react";
import { useForm } from "react-hook-form";
Expand Down
6 changes: 3 additions & 3 deletions mobile/app/(observer)/(app)/polling-station-wizzard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const PollingStationWizzardContent = ({
);

const pollingStationsMappedOptions = useMemo(
() => mapPollingStationOptionsToSelectValues(pollingStationOptions),
() => mapPollingStationOptionsToSelectValues(pollingStationOptions ?? []),
[pollingStationOptions],
);

Expand All @@ -118,7 +118,7 @@ const PollingStationWizzardContent = ({
};

const isLastElement: boolean = useMemo(
() => !!pollingStationOptions[0]?.pollingStationId,
() => !!pollingStationOptions?.[0]?.pollingStationId,
[pollingStationOptions],
);

Expand Down Expand Up @@ -150,7 +150,7 @@ const PollingStationWizzardContent = ({
if (!selectedOption) {
return;
}
const pollingStation = pollingStationOptions.find((option) => option.id === selectedOption.id);
const pollingStation = pollingStationOptions?.find((option) => option.id === selectedOption.id);

if (pollingStation?.pollingStationId && activeElectionRound) {
await queryClient.cancelQueries({
Expand Down
2 changes: 1 addition & 1 deletion mobile/app/(observer)/(app)/report-issue.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import {
MULTIPART_FILE_UPLOAD_SIZE,
MUTATION_SCOPE_DO_NOT_HYDRATE,
} from "../../../common/constants";
import * as FileSystem from "expo-file-system";
import * as FileSystem from "expo-file-system/legacy";
import { Buffer } from "buffer";
import MediaLoading from "../../../components/MediaLoading";
import { useNetInfoContext } from "../../../contexts/net-info-banner/NetInfoContext";
Expand Down
6 changes: 3 additions & 3 deletions mobile/app/citizen/main/select-location.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ export default function CitizenSelectLocation() {
);

const filteredOptions = useMemo(() => {
const options = mapCitizenLocationsToSelectValues(citizenLocations);
const options = mapCitizenLocationsToSelectValues(citizenLocations ?? []);
if (!searchTerm) return options.slice(0, sliceNumber);
return options
.filter((option) => option.label.toLowerCase().includes(searchTerm.toLowerCase()))
.slice(0, sliceNumber);
}, [citizenLocations, searchTerm, sliceNumber]);

const isLastElement: boolean = useMemo(
() => !!citizenLocations[0]?.locationId,
() => !!citizenLocations?.[0]?.locationId,
[citizenLocations],
);

Expand Down Expand Up @@ -106,7 +106,7 @@ export default function CitizenSelectLocation() {
};

const onFinishButtonPress = async () => {
const selectedLocationId = citizenLocations.find(
const selectedLocationId = citizenLocations?.find(
(location) => location.id === selectedOption?.id,
)?.locationId;
router.replace(
Expand Down
3 changes: 2 additions & 1 deletion mobile/assets/locales/az/translations_AZ.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"ru": "Rus dili",
"az": "Azərbaycan dili",
"es": "Ispan dili",
"de": "Alman dili"
"de": "Alman dili",
"pt-BR": "Portugali (Braziliya) dili"
},
"onboarding": {
"language": {
Expand Down
3 changes: 2 additions & 1 deletion mobile/assets/locales/bg/translations_BG.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"ru": "руски",
"az": "азербайджански",
"es": "испански",
"de": "немски"
"de": "немски",
"pt-BR": "португалски (Бразилия)"
},
"onboarding": {
"language": {
Expand Down
9 changes: 5 additions & 4 deletions mobile/assets/locales/de/translations_DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"ru": "Russisch",
"az": "Aserbaidschanisch",
"es": "Spanisch",
"de": "Deutsch"
"de": "Deutsch",
"pt-BR": "Portugiesisch (Brasilien)"
},
"onboarding": {
"language": {
Expand Down Expand Up @@ -390,9 +391,9 @@
"navigate_to_polling_station": "Zur Wahllokal-Ansicht wechseln"
},
"navigate_to_polling_station": {
"title": "Zum Wahllokal navigieren",
"description": "Wählen Sie eine Karten-App, um eine Wegbeschreibung zum Wahllokal zu erhalten.",
"cancel": "Abbrechen"
"title": "Zum Wahllokal navigieren",
"description": "Wählen Sie eine Karten-App, um eine Wegbeschreibung zum Wahllokal zu erhalten.",
"cancel": "Abbrechen"
}
},
"polling_station_information_form": {
Expand Down
6 changes: 3 additions & 3 deletions mobile/assets/locales/en/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"ru": "Russian",
"az": "Azerbaijani",
"es": "Spanish",
"de": "German"
"de": "German",
"pt-BR": "Portuguese (Brazil)"
},
"onboarding": {
"language": {
Expand Down Expand Up @@ -463,7 +464,6 @@
"cancel": "Cancel"
}
},

"delete_submission_modal": {
"title": "Delete submission",
"description": {
Expand Down Expand Up @@ -903,4 +903,4 @@
"attachments": "Attachments:",
"notes": "Notes:"
}
}
}
3 changes: 2 additions & 1 deletion mobile/assets/locales/es/translations_ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"ru": "Ruso",
"az": "Azerbaiyano",
"es": "Español",
"de": "Alemán"
"de": "Alemán",
"pt-BR": "Portugués (Brasil)"
},
"onboarding": {
"language": {
Expand Down
Loading
Loading