mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-10-06 11:16:10 +08:00
Fix a few misc exceptions sent to Sentry
This commit is contained in:
parent
cb02bf1000
commit
3cde64fcd5
6 changed files with 31 additions and 11 deletions
11
.github/workflows/build-macos.yaml
vendored
11
.github/workflows/build-macos.yaml
vendored
|
@ -2,10 +2,9 @@ name: Build for macOS
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
branches: master
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build-macos:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
# Confusingly, macos-13 is intel and macos-latest is ARM
|
# Confusingly, macos-13 is intel and macos-latest is ARM
|
||||||
|
@ -14,8 +13,14 @@ jobs:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
steps:
|
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
|
- name: Checkout Repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Cache NodeJS modules
|
- name: Cache NodeJS modules
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
|
|
|
@ -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.
|
- The RPM build no longer generate build_id links to prevent conflicts when installing multiple Electron apps.
|
||||||
|
|
||||||
# versions of electron apps
|
|
||||||
|
|
||||||
## 1.15.0
|
## 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.
|
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.
|
||||||
|
|
|
@ -75,7 +75,7 @@ class ContactDetailWithFocus extends React.Component<ContactDetailProps, Contact
|
||||||
const contact =
|
const contact =
|
||||||
editing === 'new' && 'accountId' in perspective
|
editing === 'new' && 'accountId' in perspective
|
||||||
? emptyContactForAccountId(perspective.accountId)
|
? emptyContactForAccountId(perspective.accountId)
|
||||||
: contacts.find(c => c.id === focusedId);
|
: contacts?.find(c => c.id === focusedId);
|
||||||
|
|
||||||
if (!contact) {
|
if (!contact) {
|
||||||
return { metadata: null, data: null, contact: null };
|
return { metadata: null, data: null, contact: null };
|
||||||
|
|
|
@ -150,7 +150,7 @@ export class TranslateMessageHeader extends React.Component<
|
||||||
|
|
||||||
callCldViaExtension(text, (err, result) => {
|
callCldViaExtension(text, (err, result) => {
|
||||||
if (err || !result || !result.languages?.length) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
if (!this._mounted) {
|
if (!this._mounted) {
|
||||||
|
|
|
@ -157,6 +157,10 @@ export default class AppEnvConstructor {
|
||||||
if (!originalError && !message) return;
|
if (!originalError && !message) return;
|
||||||
if (!originalError) originalError = new Error(`${message}`);
|
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()) {
|
if (!this.inDevMode()) {
|
||||||
return this.reportError(originalError, { url, line, column });
|
return this.reportError(originalError, { url, line, column });
|
||||||
}
|
}
|
||||||
|
@ -403,7 +407,8 @@ export default class AppEnvConstructor {
|
||||||
if (process.platform === 'linux') {
|
if (process.platform === 'linux') {
|
||||||
const dimensions = this.getWindowDimensions();
|
const dimensions = this.getWindowDimensions();
|
||||||
const display =
|
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 x = display.bounds.x + (display.bounds.width - dimensions.width) / 2;
|
||||||
const y = display.bounds.y + (display.bounds.height - dimensions.height) / 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) {
|
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);
|
callback(result.filePaths);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -789,7 +797,10 @@ export default class AppEnvConstructor {
|
||||||
if (options.title == null) {
|
if (options.title == null) {
|
||||||
options.title = 'Save File';
|
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);
|
callback(result.filePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -811,7 +822,9 @@ export default class AppEnvConstructor {
|
||||||
|
|
||||||
let winToShow = null;
|
let winToShow = null;
|
||||||
if (showInMainWindow) {
|
if (showInMainWindow) {
|
||||||
winToShow = require('@electron/remote').getGlobal('application').getMainWindow();
|
winToShow = require('@electron/remote')
|
||||||
|
.getGlobal('application')
|
||||||
|
.getMainWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!detail) {
|
if (!detail) {
|
||||||
|
|
|
@ -465,6 +465,10 @@ export class ImageAttachmentItem extends Component<ImageAttachmentItemProps> {
|
||||||
imgEl = parent.querySelector('.file-preview img') as HTMLImageElement,
|
imgEl = parent.querySelector('.file-preview img') as HTMLImageElement,
|
||||||
editor = this._editor();
|
editor = this._editor();
|
||||||
|
|
||||||
|
if (!editor) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this._pData = { x: ev.pageX, y: ev.pageY, eH: editor.clientHeight };
|
this._pData = { x: ev.pageX, y: ev.pageY, eH: editor.clientHeight };
|
||||||
this._shiftData.held = ev.shiftKey;
|
this._shiftData.held = ev.shiftKey;
|
||||||
this._shiftData.ratio = { wh: imgEl.width / imgEl.height, hw: imgEl.height / imgEl.width };
|
this._shiftData.ratio = { wh: imgEl.width / imgEl.height, hw: imgEl.height / imgEl.width };
|
||||||
|
|
Loading…
Add table
Reference in a new issue