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