Closed moelrobi closed 6 years ago
Can we like start the cleaning job once the array index reached 100(further discuss), and maybe add a new child method for getChat()
for keep tracking how many object is inside the array and a method for the actual cleaning job
Examples
const chats = await Amino.getJoinedChats(community);
chats.threads.forEach(async (el) => {
const chat = await Amino.getChat(community, el.threadId);
const howMany = await chat.stacks(); // #=> 10
// If the stacks is over 20, then clean it up plz
if(howMany >= 20){
await chat.cleanUpStacks();
}
});
Getting fixed in #39
Closed!
Describe the bug The Array when getChat is Called is stacking / filling up without any clearing. So with every call the Array Fills up.
To Reproduce Steps to reproduce the behavior:
Expected behavior It should return one Messages Array per Call and clear it right after, instead it filles the Array endllessly.
Desktop (please complete the following information):