Notifications inbox (M489), Discover taste-arm fix, web tooling majors #151
+10
-1
@@ -174,10 +174,19 @@ class MutationReplayer @Inject constructor(
|
|||||||
MutationKind.PLAYBACK_ERROR_REPORT -> dispatchPlaybackErrorReport(row.payload)
|
MutationKind.PLAYBACK_ERROR_REPORT -> dispatchPlaybackErrorReport(row.payload)
|
||||||
MutationKind.SUGGESTION_SNOOZE_TOGGLE -> dispatchSuggestionSnoozeToggle(row.payload)
|
MutationKind.SUGGESTION_SNOOZE_TOGGLE -> dispatchSuggestionSnoozeToggle(row.payload)
|
||||||
MutationKind.NORMALIZATION_SET -> dispatchNormalizationSet(row.payload)
|
MutationKind.NORMALIZATION_SET -> dispatchNormalizationSet(row.payload)
|
||||||
|
MutationKind.NOTIFICATION_READ,
|
||||||
|
MutationKind.NOTIFICATIONS_READ_ALL,
|
||||||
|
MutationKind.NOTIFICATION_SETTING_SET,
|
||||||
|
-> dispatchNotification(row)
|
||||||
|
// Unknown kind — drop so a stale schema entry can't wedge the queue.
|
||||||
|
else -> Outcome.DROP
|
||||||
|
}
|
||||||
|
|
||||||
|
/** The notifications inbox's kinds (M489), split out to keep [dispatch] simple. */
|
||||||
|
private suspend fun dispatchNotification(row: CachedMutationEntity): Outcome = when (row.kind) {
|
||||||
MutationKind.NOTIFICATION_READ -> dispatchNotificationRead(row.payload)
|
MutationKind.NOTIFICATION_READ -> dispatchNotificationRead(row.payload)
|
||||||
MutationKind.NOTIFICATIONS_READ_ALL -> dispatchNotificationsReadAll(row.payload)
|
MutationKind.NOTIFICATIONS_READ_ALL -> dispatchNotificationsReadAll(row.payload)
|
||||||
MutationKind.NOTIFICATION_SETTING_SET -> dispatchNotificationSettingSet(row.payload)
|
MutationKind.NOTIFICATION_SETTING_SET -> dispatchNotificationSettingSet(row.payload)
|
||||||
// Unknown kind — drop so a stale schema entry can't wedge the queue.
|
|
||||||
else -> Outcome.DROP
|
else -> Outcome.DROP
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user