From b1feffa627ba7accec4594e250e76de13026e6f5 Mon Sep 17 00:00:00 2001 From: Michelle Tang Date: Tue, 12 Aug 2025 10:36:34 -0400 Subject: [PATCH] Sync deletion of profiles with storage service. --- .../securesms/database/NotificationProfileTables.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/NotificationProfileTables.kt b/app/src/main/java/org/thoughtcrime/securesms/database/NotificationProfileTables.kt index 6c51cf766b..b379c79bef 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/NotificationProfileTables.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/database/NotificationProfileTables.kt @@ -223,6 +223,8 @@ class NotificationProfileTables(context: Context, databaseHelper: SignalDatabase put(NotificationProfileTable.ALLOW_ALL_MENTIONS, profile.allowAllMentions.toInt()) put(NotificationProfileTable.STORAGE_SERVICE_ID, Base64.encodeWithPadding(storageServiceId)) put(NotificationProfileTable.STORAGE_SERVICE_PROTO, storageServiceProto) + put(NotificationProfileTable.DELETED_TIMESTAMP_MS, profile.deletedTimestampMs) + put(NotificationProfileTable.CREATED_AT, profile.createdAt) } val updateQuery = SqlUtil.buildTrueUpdateQuery(ID_WHERE, SqlUtil.buildArgs(profile.id), profileValues) @@ -321,6 +323,7 @@ class NotificationProfileTables(context: Context, databaseHelper: SignalDatabase .select() .from(NotificationProfileTable.TABLE_NAME) .where("${NotificationProfileTable.DELETED_TIMESTAMP_MS} = 0") + .orderBy("${NotificationProfileTable.CREATED_AT} DESC") .run() .readToList { cursor -> getProfile(cursor) } }