added undo logic to mod mail logging

added some more logging when closing the mod mail thread
This commit is contained in:
Sheldan
2020-05-09 01:10:46 +02:00
parent 379db1ff73
commit 0e7add826b
4 changed files with 99 additions and 26 deletions

View File

@@ -14,11 +14,19 @@ public class UndoActionInstance {
private List<Long> ids;
private UndoAction action;
public static UndoActionInstance getChannelDeleteAction(Long channelId, Long serverId) {
public static UndoActionInstance getChannelDeleteAction(Long serverId, Long channelId) {
return UndoActionInstance
.builder()
.action(UndoAction.DELETE_CHANNEL)
.ids(Arrays.asList(serverId, channelId))
.build();
}
public static UndoActionInstance getMessageDeleteAction(Long serverId, Long channelId, Long messageId) {
return UndoActionInstance
.builder()
.action(UndoAction.DELETE_MESSAGE)
.ids(Arrays.asList(serverId, channelId, messageId))
.build();
}
}

View File

@@ -0,0 +1,16 @@
package dev.sheldan.abstracto.core.utils;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
import java.util.concurrent.CompletableFuture;
@Getter
@Setter
@Builder
public class CompletableFutureList<T> {
private CompletableFuture<Void> mainFuture;
private List<CompletableFuture<T>> futures;
}