projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Send Sone removal notifications before removing Sone
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
core
/
Core.java
diff --git
a/src/main/java/net/pterodactylus/sone/core/Core.java
b/src/main/java/net/pterodactylus/sone/core/Core.java
index
8df8f95
..
3b958f1
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/core/Core.java
+++ b/
src/main/java/net/pterodactylus/sone/core/Core.java
@@
-1,5
+1,5
@@
/*
/*
- * Sone - Core.java - Copyright © 2010–201
5
David Roden
+ * Sone - Core.java - Copyright © 2010–201
6
David Roden
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@
-1729,8
+1729,14
@@
public class Core extends AbstractService implements SoneProvider, PostProvider,
/* TODO - we don’t have the Sone anymore. should this happen? */
return;
}
/* TODO - we don’t have the Sone anymore. should this happen? */
return;
}
- database.removeSone(sone.get());
+ for (PostReply postReply : sone.get().getReplies()) {
+ eventBus.post(new PostReplyRemovedEvent(postReply));
+ }
+ for (Post post : sone.get().getPosts()) {
+ eventBus.post(new PostRemovedEvent(post));
+ }
eventBus.post(new SoneRemovedEvent(sone.get()));
eventBus.post(new SoneRemovedEvent(sone.get()));
+ database.removeSone(sone.get());
}
/**
}
/**