update fork #128

Manually merged
tristan merged 181 commits from mirror/monocles_chat_clean:master into master 2026-01-23 14:02:38 +01:00
Showing only changes of commit 2c4cab4acb - Show all commits

Remove deleted story from internal list immediately

Arne 2025-12-30 11:58:59 +01:00

View file

@ -7916,6 +7916,16 @@ public class XmppConnectionService extends Service {
Iq iq = getIqGenerator().deleteItem(Namespace.PUBSUB_STORIES, storyId);
this.sendIqPacket(account, iq, response -> {
if (response.getType() == Iq.Type.RESULT) {
final List<eu.siacs.conversations.entities.Story> newStories = new ArrayList<>(stories);
for (Iterator<eu.siacs.conversations.entities.Story> iterator = newStories.iterator(); iterator.hasNext(); ) {
if (iterator.next().getUuid().equals(storyId)) {
iterator.remove();
break;
}
}
this.stories.clear();
this.stories.addAll(newStories);
updateStoriesUi();
if (callback != null) {
callback.success(null);
}