mirror of
https://github.com/aljazceru/signal-cli.git
synced 2025-12-31 12:54:19 +01:00
Make deviceId an int
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user