Remove unused code and dependencies

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2024-05-01 19:13:53 +02:00
parent 28b6bc2909
commit f720e60b49
4 changed files with 2 additions and 46 deletions

View file

@ -62,7 +62,6 @@
"@lexical/selection": "^0.14.2",
"@lexical/utils": "^0.14.2",
"@mkljczk/react-hotkeys": "^1.2.2",
"@noble/hashes": "^1.3.3",
"@popperjs/core": "^2.11.5",
"@reach/combobox": "^0.18.0",
"@reach/menu-button": "^0.18.0",
@ -104,11 +103,9 @@
"babel-plugin-formatjs": "^10.5.6",
"babel-plugin-preval": "^5.1.0",
"blurhash": "^2.0.0",
"bootstrap-icons": "^1.5.0",
"bowser": "^2.11.0",
"browserslist": "^4.16.6",
"clsx": "^2.0.0",
"comlink": "^4.4.1",
"core-js": "^3.27.2",
"cryptocurrency-icons": "^0.18.1",
"cssnano": "^6.0.0",
@ -169,7 +166,6 @@
"sass": "^1.69.5",
"semver": "^7.3.8",
"stringz": "^2.0.0",
"substring-trie": "^1.0.2",
"tiny-queue": "^0.2.1",
"tslib": "^2.3.1",
"twemoji": "https://github.com/twitter/twemoji#v14.0.2",

View file

@ -1,7 +1,6 @@
import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
import { defineMessage } from 'react-intl';
import { createSelector } from 'reselect';
import { v4 as uuid } from 'uuid';
import { patchMe } from 'soapbox/actions/me';
import messages from 'soapbox/messages';
@ -107,10 +106,6 @@ const defaultSettings = ImmutableMap({
move: false,
'pleroma:emoji_reaction': false,
}),
birthdays: ImmutableMap({
show: true,
}),
}),
community: ImmutableMap({
@ -155,18 +150,10 @@ const defaultSettings = ImmutableMap({
}),
}),
groups: ImmutableMap({}),
trends: ImmutableMap({
show: true,
}),
columns: ImmutableList([
ImmutableMap({ id: 'COMPOSE', uuid: uuid(), params: {} }),
ImmutableMap({ id: 'HOME', uuid: uuid(), params: {} }),
ImmutableMap({ id: 'NOTIFICATIONS', uuid: uuid(), params: {} }),
]),
remote_timeline: ImmutableMap({
pinnedHosts: ImmutableList(),
}),
@ -196,7 +183,7 @@ const changeSettingImmediate = (path: string[], value: any, opts?: SettingOpts)
};
dispatch(action);
dispatch(saveSettingsImmediate(opts));
dispatch(saveSettings(opts));
};
const changeSetting = (path: string[], value: any, opts?: SettingOpts) =>
@ -211,7 +198,7 @@ const changeSetting = (path: string[], value: any, opts?: SettingOpts) =>
return dispatch(saveSettings(opts));
};
const saveSettingsImmediate = (opts?: SettingOpts) =>
const saveSettings = (opts?: SettingOpts) =>
(dispatch: AppDispatch, getState: () => RootState) => {
if (!isLoggedIn(getState)) return;
@ -235,9 +222,6 @@ const saveSettingsImmediate = (opts?: SettingOpts) =>
});
};
const saveSettings = (opts?: SettingOpts) =>
(dispatch: AppDispatch) => dispatch(saveSettingsImmediate(opts));
const getLocale = (state: RootState, fallback = 'en') => {
const localeWithVariant = (getSettings(state).get('locale') as string).replace('_', '-');
const locale = localeWithVariant.split('-')[0];
@ -257,7 +241,6 @@ export {
getSettings,
changeSettingImmediate,
changeSetting,
saveSettingsImmediate,
saveSettings,
getLocale,
type SettingsAction,

View file

@ -203,9 +203,6 @@ const SwitchingColumnsArea: React.FC<ISwitchingColumnsArea> = ({ children }) =>
<Redirect from='/users/:username' to='/@:username' />
<Redirect from='/registration' to='/' exact />
{/* Gab */}
<Redirect from='/home' to='/' />
{/* Mastodon rendered pages */}
<Redirect from='/admin' to='/soapbox/admin' />
<Redirect from='/terms' to='/about' />

View file

@ -1853,11 +1853,6 @@
lodash "^4.17.21"
mousetrap "^1.6.5"
"@noble/hashes@^1.3.3":
version "1.3.3"
resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.3.tgz#39908da56a4adc270147bb07968bf3b16cfe1699"
integrity sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==
"@nodelib/fs.scandir@2.1.5":
version "2.1.5"
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5"
@ -3398,11 +3393,6 @@ boolbase@^1.0.0:
resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24=
bootstrap-icons@^1.5.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/bootstrap-icons/-/bootstrap-icons-1.5.0.tgz#2cb19da148aa9105cb3174de2963564982d3dc55"
integrity sha512-44feMc7DE1Ccpsas/1wioN8ewFJNquvi5FewA06wLnqct7CwMdGDVy41ieHaacogzDqLfG8nADIvMNp9e4bfbA==
bowser@^2.11.0:
version "2.11.0"
resolved "https://registry.yarnpkg.com/bowser/-/bowser-2.11.0.tgz#5ca3c35757a7aa5771500c70a73a9f91ef420a8f"
@ -3695,11 +3685,6 @@ combined-stream@^1.0.8:
dependencies:
delayed-stream "~1.0.0"
comlink@^4.4.1:
version "4.4.1"
resolved "https://registry.yarnpkg.com/comlink/-/comlink-4.4.1.tgz#e568b8e86410b809e8600eb2cf40c189371ef981"
integrity sha512-+1dlx0aY5Jo1vHy/tSsIGpSkN4tS9rZSW8FIhG0JH/crs9wwweswIo/POr451r7bZww3hFbPAKnTpimzL/mm4Q==
commander@^2.20.0:
version "2.20.3"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
@ -8451,11 +8436,6 @@ stylelint@^16.0.2:
table "^6.8.1"
write-file-atomic "^5.0.1"
substring-trie@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/substring-trie/-/substring-trie-1.0.2.tgz#7b42592391628b4f2cb17365c6cce4257c7b7af5"
integrity sha1-e0JZI5Fii08ssXNlxszkJXx7evU=
sucrase@^3.32.0:
version "3.34.0"
resolved "https://registry.yarnpkg.com/sucrase/-/sucrase-3.34.0.tgz#1e0e2d8fcf07f8b9c3569067d92fbd8690fb576f"