Merge pull request #126 from RyanRory/fix-syncing-for-multidevice

fix syncing contacts and closed groups after device linking
This commit is contained in:
gmbnt 2020-03-03 11:57:31 +07:00 committed by GitHub
commit 957e1267a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -245,7 +245,7 @@ public class MultiDeviceContactUpdateJob extends BaseJob implements InjectableTy
}
private List<ContactData> getAllContacts() {
List<Address> contactAddresses = DatabaseFactory.getRecipientDatabase(context).getRegistered();
List<Address> contactAddresses = new ArrayList<>(DatabaseFactory.getRecipientDatabase(context).getAllAddresses());
List<ContactData> contacts = new ArrayList<>(contactAddresses.size());
for (Address address : contactAddresses) {
if (!address.isPhone()) { continue; }

View File

@ -19,7 +19,7 @@ import javax.inject.Inject
class MultiDeviceOpenGroupUpdateJob private constructor(parameters: Parameters) : BaseJob(parameters), InjectableType {
companion object {
const val KEY = "MultiDeviceGroupUpdateJob"
const val KEY = "MultiDeviceOpenGroupUpdateJob"
}
@Inject
@ -27,7 +27,7 @@ class MultiDeviceOpenGroupUpdateJob private constructor(parameters: Parameters)
constructor() : this(Parameters.Builder()
.addConstraint(NetworkConstraint.KEY)
.setQueue("MultiDeviceGroupUpdateJob")
.setQueue("MultiDeviceOpenGroupUpdateJob")
.setLifespan(TimeUnit.DAYS.toMillis(1))
.setMaxAttempts(Parameters.UNLIMITED)
.build())