Skip to content

Commit

Permalink
perf(UI): disable replaceTextButton if no result
Browse files Browse the repository at this point in the history
  • Loading branch information
tisfeng committed Dec 20, 2023
1 parent 4a3b0aa commit 9b8b0e3
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,7 @@ - (void)refreshWithResult:(EZQueryResult *)result {
EZReplaceTextButton *replaceTextButton = [[EZReplaceTextButton alloc] init];
[self addSubview:replaceTextButton];
replaceTextButton.hidden = !result.showReplaceButton;
replaceTextButton.enabled = hasTranslatedText;
self.replaceTextButton = replaceTextButton;

[replaceTextButton setClickBlock:^(EZButton *button) {
Expand Down

0 comments on commit 9b8b0e3

Please sign in to comment.