You've already forked joplin
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user