mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-05-01 22:25:46 +01:00
Reduce how often KT is reset.
This commit is contained in:
@@ -68,7 +68,6 @@ class PhoneNumberPrivacySettingsViewModel : ViewModel() {
|
|||||||
private fun setDiscoverableByPhoneNumber(discoverable: Boolean) {
|
private fun setDiscoverableByPhoneNumber(discoverable: Boolean) {
|
||||||
SignalStore.phoneNumberPrivacy.phoneNumberDiscoverabilityMode = if (discoverable) PhoneNumberDiscoverabilityMode.DISCOVERABLE else PhoneNumberDiscoverabilityMode.NOT_DISCOVERABLE
|
SignalStore.phoneNumberPrivacy.phoneNumberDiscoverabilityMode = if (discoverable) PhoneNumberDiscoverabilityMode.DISCOVERABLE else PhoneNumberDiscoverabilityMode.NOT_DISCOVERABLE
|
||||||
SignalDatabase.recipients.markNeedsSync(Recipient.self().id)
|
SignalDatabase.recipients.markNeedsSync(Recipient.self().id)
|
||||||
SignalDatabase.recipients.clearSelfKeyTransparencyData()
|
|
||||||
StorageSyncHelper.scheduleSyncForDataChange()
|
StorageSyncHelper.scheduleSyncForDataChange()
|
||||||
AppDependencies.jobManager.startChain(RefreshAttributesJob()).then(RefreshOwnProfileJob()).enqueue()
|
AppDependencies.jobManager.startChain(RefreshAttributesJob()).then(RefreshOwnProfileJob()).enqueue()
|
||||||
refresh()
|
refresh()
|
||||||
|
|||||||
@@ -2322,7 +2322,6 @@ open class RecipientTable(context: Context, databaseHelper: SignalDatabase) : Da
|
|||||||
.values(NEEDS_PNI_SIGNATURE to 0)
|
.values(NEEDS_PNI_SIGNATURE to 0)
|
||||||
.run()
|
.run()
|
||||||
|
|
||||||
clearSelfKeyTransparencyData()
|
|
||||||
SignalDatabase.pendingPniSignatureMessages.deleteAll()
|
SignalDatabase.pendingPniSignatureMessages.deleteAll()
|
||||||
|
|
||||||
db.setTransactionSuccessful()
|
db.setTransactionSuccessful()
|
||||||
@@ -2351,10 +2350,6 @@ open class RecipientTable(context: Context, databaseHelper: SignalDatabase) : Da
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (id == Recipient.self().id) {
|
|
||||||
clearSelfKeyTransparencyData()
|
|
||||||
}
|
|
||||||
|
|
||||||
if (update(id, contentValuesOf(USERNAME to username))) {
|
if (update(id, contentValuesOf(USERNAME to username))) {
|
||||||
AppDependencies.databaseObserver.notifyRecipientChanged(id)
|
AppDependencies.databaseObserver.notifyRecipientChanged(id)
|
||||||
rotateStorageId(id)
|
rotateStorageId(id)
|
||||||
|
|||||||
Reference in New Issue
Block a user