mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +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()) {
|
if (!account.isMasterDevice()) {
|
||||||
throw new NotMasterDeviceException();
|
throw new NotMasterDeviceException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final var configurationStore = account.getConfigurationStore();
|
||||||
if (readReceipts != null) {
|
if (readReceipts != null) {
|
||||||
account.getConfigurationStore().setReadReceipts(readReceipts);
|
configurationStore.setReadReceipts(readReceipts);
|
||||||
}
|
}
|
||||||
if (unidentifiedDeliveryIndicators != null) {
|
if (unidentifiedDeliveryIndicators != null) {
|
||||||
account.getConfigurationStore().setUnidentifiedDeliveryIndicators(unidentifiedDeliveryIndicators);
|
configurationStore.setUnidentifiedDeliveryIndicators(unidentifiedDeliveryIndicators);
|
||||||
}
|
}
|
||||||
if (typingIndicators != null) {
|
if (typingIndicators != null) {
|
||||||
account.getConfigurationStore().setTypingIndicators(typingIndicators);
|
configurationStore.setTypingIndicators(typingIndicators);
|
||||||
}
|
}
|
||||||
if (linkPreviews != null) {
|
if (linkPreviews != null) {
|
||||||
account.getConfigurationStore().setLinkPreviews(linkPreviews);
|
configurationStore.setLinkPreviews(linkPreviews);
|
||||||
}
|
}
|
||||||
syncHelper.sendConfigurationMessage();
|
syncHelper.sendConfigurationMessage();
|
||||||
}
|
}
|
||||||
|
|
|
@ -357,11 +357,11 @@ public final class IncomingMessageHandler {
|
||||||
}
|
}
|
||||||
if (syncMessage.getConfiguration().isPresent()) {
|
if (syncMessage.getConfiguration().isPresent()) {
|
||||||
final var configurationMessage = syncMessage.getConfiguration().get();
|
final var configurationMessage = syncMessage.getConfiguration().get();
|
||||||
account.getConfigurationStore().setReadReceipts(configurationMessage.getReadReceipts().orNull());
|
final var configurationStore = account.getConfigurationStore();
|
||||||
account.getConfigurationStore().setLinkPreviews(configurationMessage.getLinkPreviews().orNull());
|
configurationStore.setReadReceipts(configurationMessage.getReadReceipts().orNull());
|
||||||
account.getConfigurationStore().setTypingIndicators(configurationMessage.getTypingIndicators().orNull());
|
configurationStore.setLinkPreviews(configurationMessage.getLinkPreviews().orNull());
|
||||||
account.getConfigurationStore()
|
configurationStore.setTypingIndicators(configurationMessage.getTypingIndicators().orNull());
|
||||||
.setUnidentifiedDeliveryIndicators(configurationMessage.getUnidentifiedDeliveryIndicators()
|
configurationStore.setUnidentifiedDeliveryIndicators(configurationMessage.getUnidentifiedDeliveryIndicators()
|
||||||
.orNull());
|
.orNull());
|
||||||
}
|
}
|
||||||
return actions;
|
return actions;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue