mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Remove unused code
This commit is contained in:
parent
a754eb6faf
commit
8a0005d900
4 changed files with 1 additions and 31 deletions
|
@ -34,7 +34,6 @@ import org.asamk.signal.manager.groups.GroupNotFoundException;
|
|||
import org.asamk.signal.manager.groups.GroupSendingNotAllowedException;
|
||||
import org.asamk.signal.manager.groups.LastGroupAdminException;
|
||||
import org.asamk.signal.manager.groups.NotAGroupMemberException;
|
||||
import org.asamk.signal.manager.storage.recipients.Profile;
|
||||
import org.whispersystems.signalservice.api.util.PhoneNumberFormatter;
|
||||
|
||||
import java.io.Closeable;
|
||||
|
@ -104,8 +103,6 @@ public interface Manager extends Closeable {
|
|||
|
||||
void setRegistrationLockPin(Optional<String> pin) throws IOException, NotPrimaryDeviceException;
|
||||
|
||||
Profile getRecipientProfile(RecipientIdentifier.Single recipient) throws IOException, UnregisteredRecipientException;
|
||||
|
||||
List<Group> getGroups();
|
||||
|
||||
SendGroupMessageResults quitGroup(
|
||||
|
@ -221,14 +218,12 @@ public interface Manager extends Closeable {
|
|||
/**
|
||||
* Receive new messages from server, returns if no new message arrive in a timespan of timeout.
|
||||
*/
|
||||
public void receiveMessages(
|
||||
void receiveMessages(
|
||||
Optional<Duration> timeout, Optional<Integer> maxMessages, ReceiveMessageHandler handler
|
||||
) throws IOException, AlreadyReceivingException;
|
||||
|
||||
void setReceiveConfig(ReceiveConfig receiveConfig);
|
||||
|
||||
boolean hasCaughtUpWithOldMessages();
|
||||
|
||||
boolean isContactBlocked(RecipientIdentifier.Single recipient);
|
||||
|
||||
void sendContacts() throws IOException;
|
||||
|
|
|
@ -377,11 +377,6 @@ class ManagerImpl implements Manager {
|
|||
context.getPreKeyHelper().refreshPreKeys();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Profile getRecipientProfile(RecipientIdentifier.Single recipient) throws UnregisteredRecipientException {
|
||||
return context.getProfileHelper().getRecipientProfile(context.getRecipientHelper().resolveRecipient(recipient));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Group> getGroups() {
|
||||
return account.getGroupStore().getGroups().stream().map(this::toGroup).toList();
|
||||
|
@ -1053,11 +1048,6 @@ class ManagerImpl implements Manager {
|
|||
context.getReceiveHelper().setReceiveConfig(receiveConfig);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCaughtUpWithOldMessages() {
|
||||
return context.getReceiveHelper().hasCaughtUpWithOldMessages();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isContactBlocked(final RecipientIdentifier.Single recipient) {
|
||||
final RecipientId recipientId;
|
||||
|
|
|
@ -61,10 +61,6 @@ public class ReceiveHelper {
|
|||
this.needsToRetryFailedMessages = needsToRetryFailedMessages;
|
||||
}
|
||||
|
||||
public boolean hasCaughtUpWithOldMessages() {
|
||||
return hasCaughtUpWithOldMessages;
|
||||
}
|
||||
|
||||
public void setAuthenticationFailureListener(final Callable authenticationFailureListener) {
|
||||
this.authenticationFailureListener = authenticationFailureListener;
|
||||
}
|
||||
|
|
|
@ -38,7 +38,6 @@ import org.asamk.signal.manager.groups.GroupSendingNotAllowedException;
|
|||
import org.asamk.signal.manager.groups.LastGroupAdminException;
|
||||
import org.asamk.signal.manager.groups.NotAGroupMemberException;
|
||||
import org.asamk.signal.manager.storage.recipients.Contact;
|
||||
import org.asamk.signal.manager.storage.recipients.Profile;
|
||||
import org.freedesktop.dbus.DBusMap;
|
||||
import org.freedesktop.dbus.DBusPath;
|
||||
import org.freedesktop.dbus.connections.impl.DBusConnection;
|
||||
|
@ -213,11 +212,6 @@ public class DbusManagerImpl implements Manager {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Profile getRecipientProfile(final RecipientIdentifier.Single recipient) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Group> getGroups() {
|
||||
final var groups = signal.listGroups();
|
||||
|
@ -574,11 +568,6 @@ public class DbusManagerImpl implements Manager {
|
|||
public void setReceiveConfig(final ReceiveConfig receiveConfig) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCaughtUpWithOldMessages() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isContactBlocked(final RecipientIdentifier.Single recipient) {
|
||||
return signal.isContactBlocked(recipient.getIdentifier());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue