diff options
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/db/NotificationDb.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/db/NotificationDb.kt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/db/NotificationDb.kt b/app/src/main/kotlin/com/pitchedapps/frost/db/NotificationDb.kt index 532bb435..d4b51c1e 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/db/NotificationDb.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/db/NotificationDb.kt @@ -137,8 +137,11 @@ interface NotificationDao { suspend fun NotificationDao.deleteAll() = dao { _deleteAll() } -suspend fun NotificationDao.selectNotifications(userId: Long, type: String): List<NotificationContent> = dao { +fun NotificationDao.selectNotificationsSync(userId: Long, type: String): List<NotificationContent> = _selectNotifications(userId, type).map { it.toNotifContent() } + +suspend fun NotificationDao.selectNotifications(userId: Long, type: String): List<NotificationContent> = dao { + selectNotificationsSync(userId, type) } /** |