mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-09 18:05:09 +00:00
parent
69a3a63dfd
commit
48ed65639a
|
@ -35,7 +35,7 @@ import {
|
||||||
SuccessResponse,
|
SuccessResponse,
|
||||||
UpdateTotpResponse,
|
UpdateTotpResponse,
|
||||||
} from "lemmy-js-client";
|
} from "lemmy-js-client";
|
||||||
import { elementUrl, emDash, relTags } from "../../config";
|
import { elementUrl, emDash, fetchLimit, relTags } from "../../config";
|
||||||
import { FirstLoadService, UserService } from "../../services";
|
import { FirstLoadService, UserService } from "../../services";
|
||||||
import {
|
import {
|
||||||
EMPTY_REQUEST,
|
EMPTY_REQUEST,
|
||||||
|
@ -276,6 +276,7 @@ export class Settings extends Component<any, SettingsState> {
|
||||||
...this.state,
|
...this.state,
|
||||||
personBlocks: mui.person_blocks,
|
personBlocks: mui.person_blocks,
|
||||||
communityBlocks: mui.community_blocks,
|
communityBlocks: mui.community_blocks,
|
||||||
|
instanceBlocks: mui.instance_blocks,
|
||||||
saveUserSettingsForm: {
|
saveUserSettingsForm: {
|
||||||
...this.state.saveUserSettingsForm,
|
...this.state.saveUserSettingsForm,
|
||||||
show_nsfw,
|
show_nsfw,
|
||||||
|
@ -1240,16 +1241,16 @@ export class Settings extends Component<any, SettingsState> {
|
||||||
searchInstanceOptions =
|
searchInstanceOptions =
|
||||||
this.state.instancesRes.data.federated_instances?.linked.filter(
|
this.state.instancesRes.data.federated_instances?.linked.filter(
|
||||||
instance =>
|
instance =>
|
||||||
instance.domain.toLowerCase().includes(text.toLowerCase()) ||
|
instance.domain.toLowerCase().includes(text.toLowerCase()) &&
|
||||||
!this.state.instanceBlocks.some(
|
!this.state.instanceBlocks.some(
|
||||||
blockedIntance => blockedIntance.instance.id === instance.id,
|
blockedInstance => blockedInstance.instance.id === instance.id,
|
||||||
),
|
),
|
||||||
) ?? [];
|
) ?? [];
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
searchInstanceOptions: searchInstanceOptions
|
searchInstanceOptions: searchInstanceOptions
|
||||||
.slice(0, 30)
|
.slice(0, fetchLimit)
|
||||||
.map(instanceToChoice),
|
.map(instanceToChoice),
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -1552,7 +1553,7 @@ export class Settings extends Component<any, SettingsState> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handleImportFileChange(i: Settings, event) {
|
handleImportFileChange(i: Settings, event: any) {
|
||||||
i.setState({ settingsFile: event.target.files?.item(0) });
|
i.setState({ settingsFile: event.target.files?.item(0) });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue