Make deviceId an int

This commit is contained in:
AsamK 2022-01-22 16:41:00 +01:00
parent a3c5cfd2f4
commit 80befec589
7 changed files with 9 additions and 9 deletions

View file

@ -134,7 +134,7 @@ public interface Manager extends Closeable {
List<Device> getLinkedDevices() throws IOException;
void removeLinkedDevices(long deviceId) throws IOException;
void removeLinkedDevices(int deviceId) throws IOException;
void addDeviceLink(URI linkUri) throws IOException, InvalidDeviceLinkException;

View file

@ -289,7 +289,7 @@ public class ManagerImpl implements Manager {
}
@Override
public void removeLinkedDevices(long deviceId) throws IOException {
public void removeLinkedDevices(int deviceId) throws IOException {
context.getAccountHelper().removeLinkedDevices(deviceId);
}

View file

@ -1,3 +1,3 @@
package org.asamk.signal.manager.api;
public record Device(long id, String name, long created, long lastSeen, boolean isThisDevice) {}
public record Device(int id, String name, long created, long lastSeen, boolean isThisDevice) {}

View file

@ -98,7 +98,7 @@ public class AccountHelper {
account.setMultiDevice(true);
}
public void removeLinkedDevices(long deviceId) throws IOException {
public void removeLinkedDevices(int deviceId) throws IOException {
dependencies.getAccountManager().removeDevice(deviceId);
var devices = dependencies.getAccountManager().getDevices();
account.setMultiDevice(devices.size() > 1);