feat: notification improvements (#396)

This commit is contained in:
patak 2022-12-11 23:40:40 +01:00 committed by GitHub
parent a26cedbdd4
commit 33b0f295f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 146 additions and 51 deletions

View file

@ -1,4 +1,4 @@
import type { AccountCredentials, Emoji, Instance, Notification } from 'masto'
import type { Account, AccountCredentials, Emoji, Instance, Notification, Status } from 'masto'
export interface AppInfo {
id: string
@ -26,8 +26,23 @@ export interface ServerInfo extends Instance {
export interface GroupedNotifications {
id: string
type: string
type: Exclude<string, 'grouped-reblogs-and-favourites'>
items: Notification[]
}
export interface GroupedAccountLike {
account: Account
favourite?: Notification
reblog?: Notification
}
export interface GroupedLikeNotifications {
id: string
type: 'grouped-reblogs-and-favourites'
status: Status
likes: GroupedAccountLike[]
}
export type NotificationSlot = GroupedNotifications | GroupedLikeNotifications | Notification
export type TranslateFn = ReturnType<typeof useI18n>['t']