Merge branch 'develop' into improvement.typescript-migration

This commit is contained in:
AlexAlexandre 2021-07-15 11:54:30 -03:00
commit 584a16b20e
2 changed files with 9 additions and 4 deletions

View File

@ -7,15 +7,19 @@ import { themes } from '../../constants/colors';
import { LISTENER } from '../Toast';
import EventEmitter from '../../utils/events';
import I18n from '../../i18n';
import openLink from '../../utils/openLink';
const Link = React.memo(({
children, link, theme, onLinkPress
}) => {
const handlePress = () => {
if (!link || !onLinkPress) {
if (!link) {
return;
}
onLinkPress(link);
if (onLinkPress) {
return onLinkPress(link);
}
openLink(link, theme);
};
const childLength = React.Children.toArray(children).filter(o => o).length;

View File

@ -138,9 +138,10 @@ export function subscribeSettings() {
export default async function() {
try {
const db = database.active;
const settingsParams = JSON.stringify(Object.keys(settings).filter(key => !loginSettings.includes(key)));
const settingsParams = Object.keys(settings).filter(key => !loginSettings.includes(key));
// RC 0.60.0
const result = await fetch(`${ this.sdk.client.host }/api/v1/settings.public?query={"_id":{"$in":${ settingsParams }}}`).then(response => response.json());
const result = await fetch(`${ this.sdk.client.host }/api/v1/settings.public?query={"_id":{"$in":${ JSON.stringify(settingsParams) }}}&count=${ settingsParams.length }`)
.then(response => response.json());
if (!result.success) {
return;