New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feats and fixed functions #1015
Conversation
Sorry for ping,.. |
src/chat/functions/getAllChats.ts
Outdated
* ``` | ||
* @category Chat | ||
*/ | ||
export function getAllChats(options: GetAllChatsOptions = {}): ChatModel[] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dê uma olhada no WPP.chat.list
, pois basicamente ele é a mesma coisa, talvez seja interessante adicionar a opção de busca lá, como o count e direction
webpack.onInjected(() => register()); | ||
|
||
function register() { | ||
async function processLabelEvent(event: 'add' | 'remove', ...args: any) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Talvez aqui seria interessante fazer um teste com o ChatStore.on()
para capturar os eventos de etiquetas.
Vou fazer mais testes para saber se existe outro ponto melhor.
@icleitoncosta , poderia atualizar essa solicitação e remover o getAllChats? |
Sim, lembrei dela hje mais cedo, só vou fazer uns ajustes e atualizar |
This reverts commit 5252ec4.
Pronto, removi o getAllChats, ainda preciso entender como funciona o rebase pra excluir o commit, vc ja me explicou, mas uma hora sai direito rs |
Alguma novidade em relação aos Labels pessoal? Muito complicado de implementar? |
Fixed group doc
Added event when update chat labels
Labels update
Isso é uma solicitação de uma issue do server, que não existia um evento para tratar isso. A melhor função para ser usada, deveria ser a LabelStore.addOrRemoveLabels, porém a mesma, não consigo fazer um wrapper dela, portanto usei as funções subsequentes, a outra ideia seria utilizar o LabelStore.on('senderObj.labels...) (algo assim), porém as funções das etiquetas executavam diversas vezes, a alternativa sugerida seria usar um debounce, o executei, porém, ficaria confuso para o usuário da biblioteca, pois ele não saberia o que foi removido ou adicionado, já que o evento é executado apenas com o novo estado das etiquetas, avaliando essas opções, acredito que a alternativa enviada seja a melhor.