Skip to content

Commit

Permalink
Just do data url second if its bigger then the first data url
Browse files Browse the repository at this point in the history
  • Loading branch information
graphefruit committed Feb 2, 2025
1 parent e66e739 commit 9196d29
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,10 @@ export class BeanInformationComponent implements OnInit {
.then(async (_dataURLSecond) => {
await this.uiAlert.hideLoadingSpinner();
setTimeout(() => {
if (_dataURLSecond.length > 20) {
if (
_dataURLSecond.length > 20 &&
_dataURLSecond.length > _dataURL.length
) {
this.shareService.shareImage(_dataURLSecond);
} else {
this.shareService.shareImage(_dataURL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,10 @@ export class BrewInformationComponent implements OnInit {
.then(async (_dataURLSecond) => {
await this.uiAlert.hideLoadingSpinner();
setTimeout(() => {
if (_dataURLSecond.length > 20) {
if (
_dataURLSecond.length > 20 &&
_dataURLSecond.length > _dataURL.length
) {
this.shareService.shareImage(_dataURLSecond);
} else {
this.shareService.shareImage(_dataURL);
Expand Down

0 comments on commit 9196d29

Please sign in to comment.