Commit cccc232
committed
7540 Display maximum one notice at a time
Previously, the PermanentNoticePresenter would display a new notice every time `presentNotice` was called, losing it’s reference to any existing notice, but leaving it in the view hierarchy.
This meant that in the In-Person Payments onboarding flow, the “Continue Setup” notice would be displayed once for every failure that was shown, and only the top one removed by `dismiss` when the `.completed` step was reached.
This change makes `presentNotice` do nothing if a notice is already presented, so in the In-Person Payments scenario, there will only ever be one presented and dismissed.
The PermanentNoticePresenter is not currently used elsewhere.1 parent f471bbf commit cccc232
File tree
1 file changed
+12
-5
lines changed- WooCommerce/Classes/Tools/Notices/PermanentNotice
1 file changed
+12
-5
lines changedLines changed: 12 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
22 | 27 | | |
23 | 28 | | |
24 | 29 | | |
| |||
76 | 81 | | |
77 | 82 | | |
78 | 83 | | |
79 | | - | |
| 84 | + | |
| 85 | + | |
80 | 86 | | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
85 | 92 | | |
86 | 93 | | |
87 | 94 | | |
| |||
0 commit comments