mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Extract configurationStore variable
This commit is contained in:
parent
6f5e72119e
commit
9839be48f3
2 changed files with 12 additions and 10 deletions
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -357,12 +357,12 @@ public final class IncomingMessageHandler {
|
|||
}
|
||||
if (syncMessage.getConfiguration().isPresent()) {
|
||||
final var configurationMessage = syncMessage.getConfiguration().get();
|
||||
account.getConfigurationStore().setReadReceipts(configurationMessage.getReadReceipts().orNull());
|
||||
account.getConfigurationStore().setLinkPreviews(configurationMessage.getLinkPreviews().orNull());
|
||||
account.getConfigurationStore().setTypingIndicators(configurationMessage.getTypingIndicators().orNull());
|
||||
account.getConfigurationStore()
|
||||
.setUnidentifiedDeliveryIndicators(configurationMessage.getUnidentifiedDeliveryIndicators()
|
||||
.orNull());
|
||||
final var configurationStore = account.getConfigurationStore();
|
||||
configurationStore.setReadReceipts(configurationMessage.getReadReceipts().orNull());
|
||||
configurationStore.setLinkPreviews(configurationMessage.getLinkPreviews().orNull());
|
||||
configurationStore.setTypingIndicators(configurationMessage.getTypingIndicators().orNull());
|
||||
configurationStore.setUnidentifiedDeliveryIndicators(configurationMessage.getUnidentifiedDeliveryIndicators()
|
||||
.orNull());
|
||||
}
|
||||
return actions;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue