mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Remove dead code and fix inspection issues
This commit is contained in:
parent
6ffeb7c431
commit
e83f43065e
13 changed files with 10 additions and 82 deletions
|
@ -18,12 +18,10 @@ import java.util.stream.Collectors;
|
|||
|
||||
public class DbusReceiveMessageHandler implements Manager.ReceiveMessageHandler {
|
||||
|
||||
private final Manager m;
|
||||
private final DBusConnection conn;
|
||||
private final String objectPath;
|
||||
|
||||
public DbusReceiveMessageHandler(Manager m, DBusConnection conn, final String objectPath) {
|
||||
this.m = m;
|
||||
public DbusReceiveMessageHandler(DBusConnection conn, final String objectPath) {
|
||||
this.conn = conn;
|
||||
this.objectPath = objectPath;
|
||||
}
|
||||
|
@ -127,7 +125,7 @@ public class DbusReceiveMessageHandler implements Manager.ReceiveMessageHandler
|
|||
var attachments = message.attachments()
|
||||
.stream()
|
||||
.filter(a -> a.id().isPresent())
|
||||
.map(a -> getAttachmentMap(m, a))
|
||||
.map(this::getAttachmentMap)
|
||||
.collect(Collectors.toList());
|
||||
extras.put("attachments", new Variant<>(attachments, "aa{sv}"));
|
||||
}
|
||||
|
@ -180,7 +178,7 @@ public class DbusReceiveMessageHandler implements Manager.ReceiveMessageHandler
|
|||
}
|
||||
|
||||
private Map<String, Variant<?>> getAttachmentMap(
|
||||
final Manager m, final MessageEnvelope.Data.Attachment a
|
||||
final MessageEnvelope.Data.Attachment a
|
||||
) {
|
||||
final var map = new HashMap<String, Variant<?>>();
|
||||
if (a.id().isPresent()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue