mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-15 07:28:30 +00:00
Process notification profiles before accounts during storage sync.
This commit is contained in:
@@ -464,11 +464,11 @@ class StorageSyncJob private constructor(parameters: Parameters, private var loc
|
||||
ContactRecordProcessor().process(records.contacts, StorageSyncHelper.KEY_GENERATOR)
|
||||
GroupV1RecordProcessor().process(records.gv1, StorageSyncHelper.KEY_GENERATOR)
|
||||
GroupV2RecordProcessor().process(records.gv2, StorageSyncHelper.KEY_GENERATOR)
|
||||
NotificationProfileRecordProcessor().process(records.notificationProfileRecords, StorageSyncHelper.KEY_GENERATOR)
|
||||
AccountRecordProcessor(context, freshSelf()).process(records.account, StorageSyncHelper.KEY_GENERATOR)
|
||||
StoryDistributionListRecordProcessor().process(records.storyDistributionLists, StorageSyncHelper.KEY_GENERATOR)
|
||||
CallLinkRecordProcessor().process(records.callLinkRecords, StorageSyncHelper.KEY_GENERATOR)
|
||||
ChatFolderRecordProcessor().process(records.chatFolderRecords, StorageSyncHelper.KEY_GENERATOR)
|
||||
NotificationProfileRecordProcessor().process(records.notificationProfileRecords, StorageSyncHelper.KEY_GENERATOR)
|
||||
}
|
||||
|
||||
private fun getAllLocalStorageIds(self: Recipient): List<StorageId> {
|
||||
|
||||
@@ -310,13 +310,12 @@ object StorageSyncHelper {
|
||||
val localProfile = SignalDatabase.notificationProfiles.getProfile(query)
|
||||
|
||||
if (localProfile == null) {
|
||||
Log.w(TAG, "Unable to find local notification profile with given remote id")
|
||||
Log.w(TAG, "Unable to find local notification profile with given remote id $remoteId")
|
||||
} else {
|
||||
val disabledAt = System.currentTimeMillis()
|
||||
Log.i(TAG, "Setting manually enabled profile to ${localProfile.id} ending at $remoteEndTime. Disabled at: $disabledAt")
|
||||
Log.i(TAG, "Setting manually enabled profile to ${localProfile.id} ending at $remoteEndTime.")
|
||||
SignalStore.notificationProfile.manuallyEnabledProfile = localProfile.id
|
||||
SignalStore.notificationProfile.manuallyEnabledUntil = remoteEndTime
|
||||
SignalStore.notificationProfile.manuallyDisabledAt = disabledAt
|
||||
SignalStore.notificationProfile.manuallyDisabledAt = 0L
|
||||
}
|
||||
}
|
||||
} else if (update.new.proto.notificationProfileManualOverride!!.disabledAtTimestampMs != null) {
|
||||
|
||||
Reference in New Issue
Block a user