mirror of
https://github.com/anyproto/anytype-ts.git
synced 2025-06-07 21:47:02 +09:00
code review
This commit is contained in:
parent
9ac972c10a
commit
f6ad0d984c
3 changed files with 11 additions and 3 deletions
|
@ -366,7 +366,6 @@ class MenuManager {
|
|||
Separator,
|
||||
|
||||
{ label: 'Reset onboarding', click: () => Util.send(this.win, 'commandGlobal', 'resetOnboarding') },
|
||||
|
||||
{ label: 'Read all messages', click: () => Util.send(this.win, 'commandGlobal', 'readAllMessages') },
|
||||
|
||||
Separator,
|
||||
|
|
|
@ -2314,7 +2314,6 @@ export const ChatDeleteMessage = (objectId: string, messageId: string, callBack?
|
|||
request.setMessageid(messageId);
|
||||
|
||||
dispatcher.request(ChatDeleteMessage.name, request, callBack);
|
||||
|
||||
};
|
||||
|
||||
export const ChatGetMessages = (objectId: string, beforeOrderId: string, afterOrderId: string, limit: number, includeBoundary: boolean, callBack?: (message: any) => void) => {
|
||||
|
@ -2350,6 +2349,12 @@ export const ChatUnreadMessages = (objectId: string, afterOrderId: string, callB
|
|||
dispatcher.request(ChatUnreadMessages.name, request, callBack);
|
||||
};
|
||||
|
||||
export const ChatReadAll = (callBack?: (message: any) => void) => {
|
||||
const request = new Rpc.Chat.ReadAll.Request();
|
||||
|
||||
dispatcher.request(ChatReadAll.name, request, callBack);
|
||||
};
|
||||
|
||||
export const ChatSubscribeLastMessages = (objectId: string, limit: number, subId: string, callBack?: (message: any) => void) => {
|
||||
const request = new Rpc.Chat.SubscribeLastMessages.Request();
|
||||
|
||||
|
|
|
@ -559,7 +559,6 @@ class Keyboard {
|
|||
const logPath = electron.logPath();
|
||||
const tmpPath = electron.tmpPath();
|
||||
const route = analytics.route.menuSystem;
|
||||
const isMainChat = this.isMainChat();
|
||||
const canUndo = !this.isFocused && this.isMainEditor();
|
||||
|
||||
switch (cmd) {
|
||||
|
@ -814,6 +813,11 @@ class Keyboard {
|
|||
break;
|
||||
};
|
||||
|
||||
case 'readAllMessages': {
|
||||
C.ChatReadAll();
|
||||
break;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue