mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 01:36:22 +00:00
Merge pull request #2651 from ZeroX-DG/fix-delete-note
Fixed delete note not navigating to the next note
This commit is contained in:
@@ -656,14 +656,18 @@ class NoteList extends React.Component {
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
data.forEach((item) => {
|
const dispatchHandler = () => {
|
||||||
dispatch({
|
data.forEach((item) => {
|
||||||
type: 'DELETE_NOTE',
|
dispatch({
|
||||||
storageKey: item.storageKey,
|
type: 'DELETE_NOTE',
|
||||||
noteKey: item.noteKey
|
storageKey: item.storageKey,
|
||||||
|
noteKey: item.noteKey
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
}
|
||||||
|
ee.once('list:next', dispatchHandler)
|
||||||
})
|
})
|
||||||
|
.then(() => ee.emit('list:next'))
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.error('Cannot Delete note: ' + err)
|
console.error('Cannot Delete note: ' + err)
|
||||||
})
|
})
|
||||||
@@ -687,6 +691,7 @@ class NoteList extends React.Component {
|
|||||||
})
|
})
|
||||||
AwsMobileAnalyticsConfig.recordDynamicCustomEvent('EDIT_NOTE')
|
AwsMobileAnalyticsConfig.recordDynamicCustomEvent('EDIT_NOTE')
|
||||||
})
|
})
|
||||||
|
.then(() => ee.emit('list:next'))
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.error('Notes could not go to trash: ' + err)
|
console.error('Notes could not go to trash: ' + err)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user