Skip to content

Commit

Permalink
optimize dismiss
Browse files Browse the repository at this point in the history
  • Loading branch information
xdd666t committed Jun 5, 2023
1 parent dc1e818 commit f0b9051
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions lib/src/helper/dialog_proxy.dart
Original file line number Diff line number Diff line change
Expand Up @@ -352,13 +352,23 @@ class DialogProxy {
}

if (notifyQueue.isNotEmpty) {
return CustomNotify.dismiss<T>(
type: DialogType.notify,
tag: tag,
result: result,
force: force,
closeType: closeType,
);
bool useNotify = (tag == null);
if (tag != null) {
for (var element in notifyQueue) {
if (element.tag == tag) {
useNotify = true;
}
}
}
if (useNotify) {
return CustomNotify.dismiss<T>(
type: DialogType.notify,
tag: tag,
result: result,
force: force,
closeType: closeType,
);
}
}

if (dialogQueue.isNotEmpty) {
Expand Down

0 comments on commit f0b9051

Please sign in to comment.