Skip to content

Commit 498f1d4

Browse files
authored
Merge pull request #150 from Resgrid/develop
Develop
2 parents 78a491c + 8a9e15a commit 498f1d4

22 files changed

+2195
-321
lines changed

app.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
4444
bundleIdentifier: Env.BUNDLE_ID,
4545
requireFullScreen: true,
4646
infoPlist: {
47-
UIBackgroundModes: ['remote-notification', 'audio', 'bluetooth-central'],
47+
UIBackgroundModes: ['remote-notification', 'audio', 'bluetooth-central', 'voip'],
4848
ITSAppUsesNonExemptEncryption: false,
4949
NSBluetoothAlwaysUsageDescription: 'Allow Resgrid Unit to connect to bluetooth devices for PTT.',
5050
},

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@
113113
"expo-file-system": "~18.0.12",
114114
"expo-font": "~13.0.2",
115115
"expo-image": "~2.0.7",
116+
"expo-image-manipulator": "~13.0.6",
116117
"expo-image-picker": "~16.0.6",
117118
"expo-keep-awake": "~14.0.3",
118119
"expo-linking": "~7.0.3",

src/app/_layout.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,16 @@ const navigationIntegration = Sentry.reactNavigationIntegration({
4747
Sentry.init({
4848
dsn: Env.SENTRY_DSN,
4949
debug: __DEV__, // Only debug in development, not production
50-
tracesSampleRate: __DEV__ ? 1.0 : 0.1, // 100% in dev, 10% in production to reduce performance impact
50+
tracesSampleRate: __DEV__ ? 1.0 : 0.2, // 100% in dev, 20% in production to reduce performance impact
51+
profilesSampleRate: __DEV__ ? 1.0 : 0.2, // 100% in dev, 20% in production to reduce performance impact
52+
sendDefaultPii: false,
5153
integrations: [
5254
// Pass integration
5355
navigationIntegration,
5456
],
55-
enableNativeFramesTracking: !isRunningInExpoGo(), // Tracks slow and frozen frames in the application
57+
enableNativeFramesTracking: true, //!isRunningInExpoGo(), // Tracks slow and frozen frames in the application
5658
// Add additional options to prevent timing issues
57-
beforeSendTransaction(event) {
59+
beforeSendTransaction(event: any) {
5860
// Filter out problematic navigation transactions that might cause timestamp errors
5961
if (event.contexts?.trace?.op === 'navigation' && !event.contexts?.trace?.data?.route) {
6062
return null;

src/app/call/[id].tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,9 @@ export default function CallDetail() {
103103
// Set this call as the active call in the core store
104104
await useCoreStore.getState().setActiveCall(call.CallId);
105105

106-
// Find a "Responding" or "En Route" status from the available statuses
107-
const respondingStatus = activeStatuses?.Statuses.find(
108-
(status) => status.Text.toLowerCase().includes('responding') || status.Text.toLowerCase().includes('en route') || status.Text.toLowerCase().includes('enroute')
109-
);
110-
111-
// Pre-select the current call and open the status bottom sheet
106+
// Pre-select the current call and open the status bottom sheet without a pre-selected status
112107
setSelectedCall(call);
113-
setStatusBottomSheetOpen(true, respondingStatus || activeStatuses?.Statuses[0]);
108+
setStatusBottomSheetOpen(true); // No status provided, will start with status selection
114109

115110
// Show success message
116111
showToast('success', t('call_detail.set_active_success'));

src/app/call/__tests__/[id].test.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -631,10 +631,8 @@ describe('CallDetail', () => {
631631
// Should call setSelectedCall with the current call
632632
expect(mockSetSelectedCall).toHaveBeenCalledWith(mockCall);
633633

634-
// Should call setIsOpen with true and the appropriate status
635-
expect(mockSetIsOpen).toHaveBeenCalledWith(true, expect.objectContaining({
636-
Text: 'En Route'
637-
}));
634+
// Should call setIsOpen with true but no pre-selected status (for status selection)
635+
expect(mockSetIsOpen).toHaveBeenCalledWith(true);
638636

639637
// Should show success toast
640638
expect(mockShowToast).toHaveBeenCalledWith('success', 'call_detail.set_active_success');
@@ -881,10 +879,8 @@ describe('CallDetail', () => {
881879
// Should call setSelectedCall with the current call
882880
expect(mockSetSelectedCall).toHaveBeenCalledWith(mockCall);
883881

884-
// Should call setIsOpen with true and the first available status (since no "En Route" found)
885-
expect(mockSetIsOpen).toHaveBeenCalledWith(true, expect.objectContaining({
886-
Text: 'Available'
887-
}));
882+
// Should call setIsOpen with true but no pre-selected status (for status selection)
883+
expect(mockSetIsOpen).toHaveBeenCalledWith(true);
888884

889885
// Should show success toast
890886
expect(mockShowToast).toHaveBeenCalledWith('success', 'call_detail.set_active_success');

0 commit comments

Comments
 (0)