Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/aspect ratio #526

Merged
merged 7 commits into from
Oct 3, 2023
Merged

Feat/aspect ratio #526

merged 7 commits into from
Oct 3, 2023

Conversation

nd0ut
Copy link
Member

@nd0ut nd0ut commented Sep 28, 2023

uploadCollection.size === 1 &&
this.cfg.useCloudImageEditor &&
this.hasBlockInCtx((block) => block.activityType === ActivityBlock.activities.CLOUD_IMG_EDIT)
) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 условия и несколько циклов. Новому человеку, конечно, трудно будет во всем этом разбираться

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Условие не рефачил, но весь блок кода вытащил отдельно

try {
fetch(createCdnUrl(this.$['*originalUrl'], createCdnUrlModifiers('json')))
.then((response) => response.json())
.then((json) => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

async синтаксис здесь не получается сделать?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Да, теперь можно, остался хвост, раньше там надо было это совсем асинхронно делать

}
}
return message.url;
})();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Страшно, вырубай

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Согласен, вырубил :)

@nd0ut nd0ut merged commit eb6cd99 into main Oct 3, 2023
3 checks passed
@nd0ut nd0ut deleted the feat/aspect-ratio branch October 3, 2023 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants