]> nmode's Git Repositories - signal-cli/blobdiff - lib/src/main/java/org/asamk/signal/manager/ManagerImpl.java
Fix device id type
[signal-cli] / lib / src / main / java / org / asamk / signal / manager / ManagerImpl.java
index 36c131db1996941cc80724e2e0eae0a33653b55d..0fd1eb33cf0d69a937f45ab6e52c4d0a91b2ccb8 100644 (file)
@@ -209,7 +209,7 @@ public class ManagerImpl implements Manager {
                 avatarStore,
                 this::resolveSignalServiceAddress,
                 account.getRecipientStore());
-        this.storageHelper = new StorageHelper(account, dependencies, groupHelper);
+        this.storageHelper = new StorageHelper(account, dependencies, groupHelper, profileHelper);
         this.contactHelper = new ContactHelper(account);
         this.syncHelper = new SyncHelper(account,
                 attachmentHelper,
@@ -330,17 +330,19 @@ public class ManagerImpl implements Manager {
         if (!account.isMasterDevice()) {
             throw new NotMasterDeviceException();
         }
+
+        final var configurationStore = account.getConfigurationStore();
         if (readReceipts != null) {
-            account.getConfigurationStore().setReadReceipts(readReceipts);
+            configurationStore.setReadReceipts(readReceipts);
         }
         if (unidentifiedDeliveryIndicators != null) {
-            account.getConfigurationStore().setUnidentifiedDeliveryIndicators(unidentifiedDeliveryIndicators);
+            configurationStore.setUnidentifiedDeliveryIndicators(unidentifiedDeliveryIndicators);
         }
         if (typingIndicators != null) {
-            account.getConfigurationStore().setTypingIndicators(typingIndicators);
+            configurationStore.setTypingIndicators(typingIndicators);
         }
         if (linkPreviews != null) {
-            account.getConfigurationStore().setLinkPreviews(linkPreviews);
+            configurationStore.setLinkPreviews(linkPreviews);
         }
         syncHelper.sendConfigurationMessage();
     }
@@ -412,7 +414,7 @@ public class ManagerImpl implements Manager {
     }
 
     @Override
-    public void removeLinkedDevices(int deviceId) throws IOException {
+    public void removeLinkedDevices(long deviceId) throws IOException {
         dependencies.getAccountManager().removeDevice(deviceId);
         var devices = dependencies.getAccountManager().getDevices();
         account.setMultiDevice(devices.size() > 1);