File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -656,14 +656,18 @@ class NoteList extends React.Component {
656
656
} )
657
657
)
658
658
. then ( ( data ) => {
659
- data . forEach ( ( item ) => {
660
- dispatch ( {
661
- type : 'DELETE_NOTE' ,
662
- storageKey : item . storageKey ,
663
- noteKey : item . noteKey
659
+ const dispatchHandler = ( ) => {
660
+ data . forEach ( ( item ) => {
661
+ dispatch ( {
662
+ type : 'DELETE_NOTE' ,
663
+ storageKey : item . storageKey ,
664
+ noteKey : item . noteKey
665
+ } )
664
666
} )
665
- } )
667
+ }
668
+ ee . once ( 'list:next' , dispatchHandler )
666
669
} )
670
+ . then ( ( ) => ee . emit ( 'list:next' ) )
667
671
. catch ( ( err ) => {
668
672
console . error ( 'Cannot Delete note: ' + err )
669
673
} )
@@ -687,6 +691,7 @@ class NoteList extends React.Component {
687
691
} )
688
692
AwsMobileAnalyticsConfig . recordDynamicCustomEvent ( 'EDIT_NOTE' )
689
693
} )
694
+ . then ( ( ) => ee . emit ( 'list:next' ) )
690
695
. catch ( ( err ) => {
691
696
console . error ( 'Notes could not go to trash: ' + err )
692
697
} )
You can’t perform that action at this time.
0 commit comments