Table of Contents

Method CountUnreadAsync

Namespace
MailFathom.Application.Notifications
Assembly
MailFathom.Application.dll

CountUnreadAsync(UserId, CancellationToken)

Counts one user's notifications that have not been read.

Task<int> CountUnreadAsync(UserId user, CancellationToken cancellationToken)

Parameters

user UserId

The user whose notifications are counted.

cancellationToken CancellationToken

Cancels the read.

Returns

Task<int>

How many of the user's notifications stand unread.

Remarks

It is a count rather than the length of a page, because the one thing a client asks for most often is the badge beside the bell and reading a page to derive it would serve a screen's worth of rows to produce one number.