mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-29 00:14:23 -04:00
Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
0f3c4afc7e
3 changed files with 3 additions and 16 deletions
|
@ -20,7 +20,7 @@ import { definePluginSettings } from "@api/Settings";
|
||||||
import { Devs } from "@utils/constants";
|
import { Devs } from "@utils/constants";
|
||||||
import definePlugin, { OptionType } from "@utils/types";
|
import definePlugin, { OptionType } from "@utils/types";
|
||||||
import { findStoreLazy } from "@webpack";
|
import { findStoreLazy } from "@webpack";
|
||||||
import { Constants, FluxDispatcher, GuildStore, RelationshipStore, RestAPI, SnowflakeUtils, UserStore } from "@webpack/common";
|
import { Constants, FluxDispatcher, GuildStore, RelationshipStore, SnowflakeUtils, UserStore } from "@webpack/common";
|
||||||
import { Settings } from "Vencord";
|
import { Settings } from "Vencord";
|
||||||
|
|
||||||
const UserAffinitiesStore = findStoreLazy("UserAffinitiesV2Store");
|
const UserAffinitiesStore = findStoreLazy("UserAffinitiesV2Store");
|
||||||
|
@ -121,19 +121,6 @@ export default definePlugin({
|
||||||
: comparator(row);
|
: comparator(row);
|
||||||
},
|
},
|
||||||
|
|
||||||
async refreshUserAffinities() {
|
|
||||||
try {
|
|
||||||
await RestAPI.get({ url: "/users/@me/affinities/users", retries: 3 }).then(({ body }) => {
|
|
||||||
FluxDispatcher.dispatch({
|
|
||||||
type: "LOAD_USER_AFFINITIES_SUCCESS",
|
|
||||||
affinities: body,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
} catch (e) {
|
|
||||||
// Not a critical error if this fails for some reason
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
async fetchImplicitRelationships() {
|
async fetchImplicitRelationships() {
|
||||||
// Implicit relationships are defined as users that you:
|
// Implicit relationships are defined as users that you:
|
||||||
// 1. Have an affinity for
|
// 1. Have an affinity for
|
||||||
|
|
|
@ -69,7 +69,7 @@ function makeSearchItem(src: string) {
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
height={16}
|
height={16}
|
||||||
width={16}
|
width={16}
|
||||||
src={`https://www.google.com/s2/favicons?domain=${Engines[engine]}&sz=64`}
|
src={`https://icons.duckduckgo.com/ip3/${new URL(Engines[engine]).hostname}.ico`}
|
||||||
/>
|
/>
|
||||||
{engine}
|
{engine}
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|
|
@ -160,7 +160,7 @@ export class SettingsStore<T extends object> {
|
||||||
// So, we need to extract the top-level setting path (plugins.pluginName.settingName),
|
// So, we need to extract the top-level setting path (plugins.pluginName.settingName),
|
||||||
// to be able to notify globalListeners and top-level setting name listeners (let { settingName } = settings.use(["settingName"]),
|
// to be able to notify globalListeners and top-level setting name listeners (let { settingName } = settings.use(["settingName"]),
|
||||||
// with the new value
|
// with the new value
|
||||||
if (paths.length > 2 && paths[0] === "plugins") {
|
if (paths.length > 3 && paths[0] === "plugins") {
|
||||||
const settingPath = paths.slice(0, 3);
|
const settingPath = paths.slice(0, 3);
|
||||||
const settingPathStr = settingPath.join(".");
|
const settingPathStr = settingPath.join(".");
|
||||||
const settingValue = settingPath.reduce((acc, curr) => acc[curr], root);
|
const settingValue = settingPath.reduce((acc, curr) => acc[curr], root);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue