From e24ef0b52de6fbbdb712300744acb02844d391d5 Mon Sep 17 00:00:00 2001 From: Nik Clayton Date: Wed, 13 Dec 2023 16:44:50 +0100 Subject: [PATCH] refactor: Use @MapColumn instead of @MapInfo (#319) `@MapInfo` is deprecated, migrate to `@MapColumn`. --- .../main/kotlin/app/pachli/core/database/dao/TimelineDao.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/database/src/main/kotlin/app/pachli/core/database/dao/TimelineDao.kt b/core/database/src/main/kotlin/app/pachli/core/database/dao/TimelineDao.kt index 35cf0df2e..e6a7a5fe4 100644 --- a/core/database/src/main/kotlin/app/pachli/core/database/dao/TimelineDao.kt +++ b/core/database/src/main/kotlin/app/pachli/core/database/dao/TimelineDao.kt @@ -20,7 +20,7 @@ package app.pachli.core.database.dao import androidx.paging.PagingSource import androidx.room.Dao import androidx.room.Insert -import androidx.room.MapInfo +import androidx.room.MapColumn import androidx.room.OnConflictStrategy.Companion.REPLACE import androidx.room.Query import androidx.room.Upsert @@ -263,14 +263,14 @@ WHERE timelineUserId = :accountId AND (serverId = :statusId OR reblogServerId = * @param serverIds the IDs of the statuses to check * @return Map between serverIds and any cached viewdata for those statuses */ - @MapInfo(keyColumn = "serverId") @Query( """SELECT * FROM StatusViewDataEntity WHERE timelineUserId = :accountId AND serverId IN (:serverIds)""", ) - abstract suspend fun getStatusViewData(accountId: Long, serverIds: List): Map + abstract suspend fun getStatusViewData(accountId: Long, serverIds: List): + Map<@MapColumn(columnName = "serverId") String, StatusViewDataEntity> @Query( """UPDATE TimelineStatusEntity SET pinned = :pinned