1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-26 22:41:17 +02:00

Desktop: Fixes #11989: Joplin became unusably slow on MacOS due to incorrect detection of architecture

This commit is contained in:
Laurent Cozic
2025-03-21 11:55:53 +01:00
parent 20f7f37b49
commit 2142373fff
5 changed files with 56 additions and 1 deletions

View File

@@ -19,6 +19,7 @@ import FileApiDriverLocal from './file-api-driver-local';
import * as mimeUtils from './mime-utils';
import BaseItem from './models/BaseItem';
import { Size } from '@joplin/utils/types';
import { arch } from 'os';
const { _ } = require('./locale');
const http = require('http');
const https = require('https');
@@ -170,6 +171,14 @@ function shimInit(options: ShimInitOptions = null) {
return Array.from(buffer);
};
shim.isAppleSilicon = () => {
return shim.isMac() && arch() === 'arm64';
};
shim.platformArch = () => {
return arch();
};
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
shim.detectAndSetLocale = function(Setting: any) {
let locale = shim.isElectron() ? shim.electronBridge().getLocale() : process.env.LANG;