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
2 changes: 1 addition & 1 deletion app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
bundleIdentifier: Env.BUNDLE_ID,
requireFullScreen: true,
infoPlist: {
UIBackgroundModes: ['remote-notification', 'audio', 'bluetooth-central'],
UIBackgroundModes: ['remote-notification', 'audio', 'bluetooth-central', 'voip'],
ITSAppUsesNonExemptEncryption: false,
NSBluetoothAlwaysUsageDescription: 'Allow Resgrid Unit to connect to bluetooth devices for PTT.',
},
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
"expo-file-system": "~18.0.12",
"expo-font": "~13.0.2",
"expo-image": "~2.0.7",
"expo-image-manipulator": "~13.0.6",
"expo-image-picker": "~16.0.6",
"expo-keep-awake": "~14.0.3",
"expo-linking": "~7.0.3",
Expand Down
8 changes: 5 additions & 3 deletions src/app/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,16 @@ const navigationIntegration = Sentry.reactNavigationIntegration({
Sentry.init({
dsn: Env.SENTRY_DSN,
debug: __DEV__, // Only debug in development, not production
tracesSampleRate: __DEV__ ? 1.0 : 0.1, // 100% in dev, 10% in production to reduce performance impact
tracesSampleRate: __DEV__ ? 1.0 : 0.2, // 100% in dev, 20% in production to reduce performance impact
profilesSampleRate: __DEV__ ? 1.0 : 0.2, // 100% in dev, 20% in production to reduce performance impact
sendDefaultPii: false,
integrations: [
// Pass integration
navigationIntegration,
],
enableNativeFramesTracking: !isRunningInExpoGo(), // Tracks slow and frozen frames in the application
enableNativeFramesTracking: true, //!isRunningInExpoGo(), // Tracks slow and frozen frames in the application
// Add additional options to prevent timing issues
beforeSendTransaction(event) {
beforeSendTransaction(event: any) {
// Filter out problematic navigation transactions that might cause timestamp errors
if (event.contexts?.trace?.op === 'navigation' && !event.contexts?.trace?.data?.route) {
return null;
Expand Down
9 changes: 2 additions & 7 deletions src/app/call/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,9 @@ export default function CallDetail() {
// Set this call as the active call in the core store
await useCoreStore.getState().setActiveCall(call.CallId);

// Find a "Responding" or "En Route" status from the available statuses
const respondingStatus = activeStatuses?.Statuses.find(
(status) => status.Text.toLowerCase().includes('responding') || status.Text.toLowerCase().includes('en route') || status.Text.toLowerCase().includes('enroute')
);

// Pre-select the current call and open the status bottom sheet
// Pre-select the current call and open the status bottom sheet without a pre-selected status
setSelectedCall(call);
setStatusBottomSheetOpen(true, respondingStatus || activeStatuses?.Statuses[0]);
setStatusBottomSheetOpen(true); // No status provided, will start with status selection

// Show success message
showToast('success', t('call_detail.set_active_success'));
Expand Down
12 changes: 4 additions & 8 deletions src/app/call/__tests__/[id].test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -631,10 +631,8 @@ describe('CallDetail', () => {
// Should call setSelectedCall with the current call
expect(mockSetSelectedCall).toHaveBeenCalledWith(mockCall);

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

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

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

// Should show success toast
expect(mockShowToast).toHaveBeenCalledWith('success', 'call_detail.set_active_success');
Expand Down
Loading
Loading