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 @@ -652,14 +652,18 @@ class NoteList extends React.Component {
652
652
} )
653
653
)
654
654
. then ( ( data ) => {
655
- data . forEach ( ( item ) => {
656
- dispatch ( {
657
- type : 'DELETE_NOTE' ,
658
- storageKey : item . storageKey ,
659
- noteKey : item . noteKey
655
+ const dispatchHandler = ( ) => {
656
+ data . forEach ( ( item ) => {
657
+ dispatch ( {
658
+ type : 'DELETE_NOTE' ,
659
+ storageKey : item . storageKey ,
660
+ noteKey : item . noteKey
661
+ } )
660
662
} )
661
- } )
663
+ }
664
+ ee . once ( 'list:next' , dispatchHandler )
662
665
} )
666
+ . then ( ( ) => ee . emit ( 'list:next' ) )
663
667
. catch ( ( err ) => {
664
668
console . error ( 'Cannot Delete note: ' + err )
665
669
} )
@@ -683,6 +687,7 @@ class NoteList extends React.Component {
683
687
} )
684
688
AwsMobileAnalyticsConfig . recordDynamicCustomEvent ( 'EDIT_NOTE' )
685
689
} )
690
+ . then ( ( ) => ee . emit ( 'list:next' ) )
686
691
. catch ( ( err ) => {
687
692
console . error ( 'Notes could not go to trash: ' + err )
688
693
} )
You can’t perform that action at this time.
0 commit comments