Enable third-party combobox on room creation

This commit is contained in:
Alexey Safronov 2023-12-07 19:12:21 +04:00
parent 0aeb7c20b6
commit aa54744e2f
2 changed files with 15 additions and 16 deletions

View File

@ -92,13 +92,13 @@ const ThirdPartyStorage = ({
return (
<StyledThirdPartyStorage>
{/* <ToggleParam
<ToggleParam
id="shared_third-party-storage-toggle"
title={t("Common:ThirdPartyStorage")}
description={t("ThirdPartyStorageDescription")}
isChecked={storageLocation.isThirdparty}
onCheckedChange={onChangeIsThirdparty}
/> */}
/>
{storageLocation.isThirdparty && (
<ThirdPartyComboBox

View File

@ -125,20 +125,19 @@ class SettingsStore {
if (!settings.enableThirdParty || this.publicRoomStore.isPublicRoom)
return;
// TODO: enable after supporting third-party
// return axios
// .all([
// api.files.getThirdPartyCapabilities(),
// api.files.getThirdPartyList(),
// ])
// .then(([capabilities, providers]) => {
// for (let item of capabilities) {
// item.splice(1, 1);
// }
// this.thirdPartyStore.setThirdPartyCapabilities(capabilities); //TODO: Out of bounds read: 1
// this.thirdPartyStore.setThirdPartyProviders(providers);
// });
return axios
.all([
api.files.getThirdPartyCapabilities(),
api.files.getThirdPartyList(),
])
.then(([capabilities, providers]) => {
debugger;
for (let item of capabilities) {
item.splice(1, 1);
}
this.thirdPartyStore.setThirdPartyCapabilities(capabilities); //TODO: Out of bounds read: 1
this.thirdPartyStore.setThirdPartyProviders(providers);
});
})
.catch(() => this.setIsErrorSettings(true));
};