mirror of
https://github.com/chrononeko/chronocat.git
synced 2024-11-25 09:37:35 +00:00
feat(api): refresh group notify
This commit is contained in:
parent
23ace145ef
commit
14729260de
@ -210,6 +210,14 @@ const responseDispatcher = async (
|
||||
return
|
||||
}
|
||||
|
||||
case 'nodeIKernelGroupListener/onGroupNotifiesUnreadCountUpdated': {
|
||||
// const {} = payload as OnGroupNotifiesUnreadCountUpdated
|
||||
|
||||
void ctx.chronocatEngineChronocatApi.groupNotify.refresh()
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
case 'onBuddyListChange':
|
||||
case 'nodeIKernelBuddyListener/onBuddyListChange': {
|
||||
const { data } = payload as OnBuddyListChange
|
||||
|
@ -27,6 +27,7 @@ import { buildMessageList } from './api/message/list'
|
||||
import { buildUserChannelCreate } from './api/user/channel/create'
|
||||
import { buildUserGet } from './api/user/get'
|
||||
import { buildHandler } from './handler'
|
||||
import { groupNotify } from './services/groupNotify'
|
||||
import { msgBoxActiv } from './services/msgBoxActiv'
|
||||
|
||||
declare const __DEFINE_CHRONO_VERSION__: string
|
||||
@ -37,6 +38,7 @@ export const version = __DEFINE_CHRONO_VERSION__
|
||||
export const apply = async (ctx: ChronocatContext) => {
|
||||
ctx.chronocatEngineChronocatApi = {
|
||||
msgBoxActiv: msgBoxActiv(ctx),
|
||||
groupNotify,
|
||||
}
|
||||
|
||||
ipcMan<RedIpcArgs>({
|
||||
|
18
packages/engine-chronocat-api/src/services/groupNotify.ts
Normal file
18
packages/engine-chronocat-api/src/services/groupNotify.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import { getSingleScreenNotifies } from '../definitions/groupService'
|
||||
|
||||
const refresh = async () => {
|
||||
void getSingleScreenNotifies({
|
||||
doubt: false,
|
||||
startSeq: '',
|
||||
number: 16,
|
||||
})
|
||||
void getSingleScreenNotifies({
|
||||
doubt: true,
|
||||
startSeq: '',
|
||||
number: 16,
|
||||
})
|
||||
}
|
||||
|
||||
export const groupNotify = {
|
||||
refresh,
|
||||
}
|
@ -1,9 +1,11 @@
|
||||
import type { groupNotify } from './services/groupNotify'
|
||||
import type { MsgBoxActiv } from './services/msgBoxActiv'
|
||||
|
||||
declare module '@chronocat/shell' {
|
||||
interface ChronocatContext {
|
||||
chronocatEngineChronocatApi: {
|
||||
msgBoxActiv: MsgBoxActiv
|
||||
groupNotify: typeof groupNotify
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -214,12 +214,6 @@ const dispatcher = async (
|
||||
return
|
||||
}
|
||||
|
||||
case 'nodeIKernelGroupListener/onGroupNotifiesUnreadCountUpdated': {
|
||||
// const {} = payload as OnGroupNotifiesUnreadCountUpdated
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
case 'nodeIKernelGroupListener/onGroupSingleScreenNotifies': {
|
||||
const { notifies } = payload as OnGroupSingleScreenNotifies
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user