mirror of
https://github.com/flarum/core.git
synced 2025-10-27 05:31:29 +01:00
Move Discussion List State into its own class (#2150)
Extract discussion list state
This commit is contained in:
committed by
GitHub
parent
c5d3b058ba
commit
5c1663d8f1
@@ -181,10 +181,7 @@ export default {
|
||||
// If this was the last post in the discussion, then we will assume that
|
||||
// the whole discussion was deleted too.
|
||||
if (!discussion.postIds().length) {
|
||||
// If there is a discussion list in the cache, remove this discussion.
|
||||
if (app.cache.discussionList) {
|
||||
app.cache.discussionList.removeDiscussion(discussion);
|
||||
}
|
||||
app.discussions.removeDiscussion(discussion);
|
||||
|
||||
if (app.viewingDiscussion(discussion)) {
|
||||
app.history.back();
|
||||
|
||||
Reference in New Issue
Block a user