diff --git a/.github/workflows/build-macos.yaml b/.github/workflows/build-macos.yaml index 8ad3dd4e0..a55afc5bc 100644 --- a/.github/workflows/build-macos.yaml +++ b/.github/workflows/build-macos.yaml @@ -2,10 +2,9 @@ name: Build for macOS on: workflow_dispatch: - branches: master jobs: - build: + build-macos: strategy: matrix: # Confusingly, macos-13 is intel and macos-latest is ARM @@ -14,8 +13,14 @@ jobs: runs-on: ${{ matrix.os }} steps: + - name: Fail if branch is not main + if: github.event_name == 'workflow_dispatch' && github.ref != 'refs/heads/master' + run: | + echo "This workflow should not be triggered with workflow_dispatch on a branch other than main" + exit 1 + - name: Checkout Repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Cache NodeJS modules uses: actions/cache@v4 diff --git a/CHANGELOG.md b/CHANGELOG.md index 4882caa09..518030f26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,8 +12,6 @@ This is a patch release that resolves several user-reported issues. Thank - The RPM build no longer generate build_id links to prevent conflicts when installing multiple Electron apps. -# versions of electron apps - ## 1.15.0 Happy 2025! This version of Mailspring upgraedes the app to Electron 33 and Chromium 130, ensuring the latest upstream bug fixes, security patches and improvements are available in the app. diff --git a/app/internal_packages/contacts/lib/ContactDetail.tsx b/app/internal_packages/contacts/lib/ContactDetail.tsx index 1d9f6e795..e4595bc27 100644 --- a/app/internal_packages/contacts/lib/ContactDetail.tsx +++ b/app/internal_packages/contacts/lib/ContactDetail.tsx @@ -75,7 +75,7 @@ class ContactDetailWithFocus extends React.Component c.id === focusedId); + : contacts?.find(c => c.id === focusedId); if (!contact) { return { metadata: null, data: null, contact: null }; diff --git a/app/internal_packages/translation/lib/message-header.tsx b/app/internal_packages/translation/lib/message-header.tsx index 4d67360db..27e18dfa7 100644 --- a/app/internal_packages/translation/lib/message-header.tsx +++ b/app/internal_packages/translation/lib/message-header.tsx @@ -150,7 +150,7 @@ export class TranslateMessageHeader extends React.Component< callCldViaExtension(text, (err, result) => { if (err || !result || !result.languages?.length) { - console.warn(`Could not detect message language: ${err.toString()}`); + console.warn(`Could not detect message language: ${err?.toString()}`); return; } if (!this._mounted) { diff --git a/app/src/app-env.ts b/app/src/app-env.ts index ebb98e973..3091d2926 100644 --- a/app/src/app-env.ts +++ b/app/src/app-env.ts @@ -157,6 +157,10 @@ export default class AppEnvConstructor { if (!originalError && !message) return; if (!originalError) originalError = new Error(`${message}`); + if (`${originalError}`.toLowerCase().includes('resizeobserver')) { + return; // happens infrequently, but errors a zillion times - too noisy for Sentry + } + if (!this.inDevMode()) { return this.reportError(originalError, { url, line, column }); } @@ -403,7 +407,8 @@ export default class AppEnvConstructor { if (process.platform === 'linux') { const dimensions = this.getWindowDimensions(); const display = - require('@electron/remote').screen.getDisplayMatching(dimensions) || require('@electron/remote').screen.getPrimaryDisplay(); + require('@electron/remote').screen.getDisplayMatching(dimensions) || + require('@electron/remote').screen.getPrimaryDisplay(); const x = display.bounds.x + (display.bounds.width - dimensions.width) / 2; const y = display.bounds.y + (display.bounds.height - dimensions.height) / 2; @@ -781,7 +786,10 @@ export default class AppEnvConstructor { } async showOpenDialog(options: Electron.OpenDialogOptions, callback: (paths: string[]) => void) { - const result = await require('@electron/remote').dialog.showOpenDialog(this.getCurrentWindow(), options); + const result = await require('@electron/remote').dialog.showOpenDialog( + this.getCurrentWindow(), + options + ); callback(result.filePaths); } @@ -789,7 +797,10 @@ export default class AppEnvConstructor { if (options.title == null) { options.title = 'Save File'; } - const result = await require('@electron/remote').dialog.showSaveDialog(this.getCurrentWindow(), options); + const result = await require('@electron/remote').dialog.showSaveDialog( + this.getCurrentWindow(), + options + ); callback(result.filePath); } @@ -811,7 +822,9 @@ export default class AppEnvConstructor { let winToShow = null; if (showInMainWindow) { - winToShow = require('@electron/remote').getGlobal('application').getMainWindow(); + winToShow = require('@electron/remote') + .getGlobal('application') + .getMainWindow(); } if (!detail) { diff --git a/app/src/components/attachment-items.tsx b/app/src/components/attachment-items.tsx index d41ebaf06..91fbcfcf6 100644 --- a/app/src/components/attachment-items.tsx +++ b/app/src/components/attachment-items.tsx @@ -465,6 +465,10 @@ export class ImageAttachmentItem extends Component { imgEl = parent.querySelector('.file-preview img') as HTMLImageElement, editor = this._editor(); + if (!editor) { + return; + } + this._pData = { x: ev.pageX, y: ev.pageY, eH: editor.clientHeight }; this._shiftData.held = ev.shiftKey; this._shiftData.ratio = { wh: imgEl.width / imgEl.height, hw: imgEl.height / imgEl.width };