diff --git a/app/src/main/helpers/clearUserData.ts b/app/src/main/helpers/clearUserData.ts deleted file mode 100644 index 19d9b12687..0000000000 --- a/app/src/main/helpers/clearUserData.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { app } from 'electron'; -import log from 'electron-log'; -import fs from 'fs'; -import { rimrafSync } from 'rimraf'; - -/** - * Clears the cache for the current user. - * Used so new versions of the app can be tested without interference from - * previous versions. - * - * On Mac, cache is stored in ~/Library/Application Support/@holium - * On Windows, cache is stored in %APPDATA%/@holium - * On Linux, cache is stored in ~/.config/@holium - */ -export const clearUserData = () => { - const userDataPath = app.getPath('userData'); - - if (fs.existsSync(userDataPath)) { - log.info('Clearing user data:', userDataPath); - rimrafSync(userDataPath); - } -}; diff --git a/app/src/main/main.ts b/app/src/main/main.ts index 736cbd5a11..647cfdb238 100644 --- a/app/src/main/main.ts +++ b/app/src/main/main.ts @@ -1,10 +1,8 @@ import { app, BrowserWindow, Menu, MenuItem, nativeImage } from 'electron'; -import log from 'electron-log'; import Store from 'electron-store'; import { RealmService } from '../os/realm.service'; import { AppUpdater } from './AppUpdater'; -import { clearUserData } from './helpers/clearUserData'; import { setRealmCursor } from './helpers/cursorSettings'; import { isMac, isMacWithCameraNotch } from './helpers/env'; import { windowWindow } from './helpers/fullscreen'; @@ -58,28 +56,6 @@ const updateMacDockMenu = ( }; export const bootRealm = () => { - const storedRealmRelease = store.get('realmRelease'); - const currentRealmRelease = app.getVersion(); - - if ( - Boolean(storedRealmRelease) && - storedRealmRelease !== currentRealmRelease - ) { - // If the stored realmRelease is different from the current realmRelease, - // it means the user has had Realm uninstalled for a while and is now - // reinstalling it, since it otherwise would have been updated by AppUpdater. - // In this case, we want to clear the user data. - log.info( - 'Booting a Realm version different from stored user data:', - storedRealmRelease, - 'vs.', - currentRealmRelease - ); - clearUserData(); - } else { - log.info('Booting a Realm version compatible with stored user data.'); - } - store.set('isStandaloneChat', false); if (!realmService) { diff --git a/app/src/renderer/system/desktop/components/Home/Ship/AppGrid.tsx b/app/src/renderer/system/desktop/components/Home/Ship/AppGrid.tsx index f586116a73..656d17837e 100644 --- a/app/src/renderer/system/desktop/components/Home/Ship/AppGrid.tsx +++ b/app/src/renderer/system/desktop/components/Home/Ship/AppGrid.tsx @@ -46,11 +46,6 @@ const AppGridPresenter = ({ maxWidth }: AppGridProps) => { window.electron.app.onMouseUp(() => { canClick.setToggle(true); }); - - return () => { - window.electron.app.removeOnMouseMove(); - window.electron.app.removeOnMouseUp(); - }; }, []); if (!currentSpace) return null; @@ -65,8 +60,7 @@ const AppGridPresenter = ({ maxWidth }: AppGridProps) => { setItems(nextState); const newGrid = Object(); - // eslint-disable-next-line array-callback-return - nextState.map((app, index: number) => { + nextState.forEach((app, index: number) => { newGrid[index] = app.id; }); bazaarStore.reorderApp(sourceIndex, targetIndex, newGrid);