mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-10 09:15:43 +02:00
Change the new DM limit behavior b/c older DMs don't load when scrolled to bottom
This commit is contained in:
parent
873fe2b393
commit
2dbf778e56
@ -1427,10 +1427,20 @@
|
||||
}
|
||||
|
||||
//
|
||||
// Block: Decrease amount of loaded DMs to avoid massive lag from re-opening them several times.
|
||||
// Block: Limit amount of loaded DMs to avoid massive lag from re-opening them several times.
|
||||
//
|
||||
if (ensurePropertyExists(TD, "services", "TwitterConversation", "CONVERSATION_ENTRY_COUNT")){
|
||||
TD.services.TwitterConversation.CONVERSATION_ENTRY_COUNT = 20;
|
||||
if (ensurePropertyExists(TD, "services", "TwitterConversation", "prototype", "renderThread")){
|
||||
const prevFunc = TD.services.TwitterConversation.prototype.renderThread;
|
||||
|
||||
TD.services.TwitterConversation.prototype.renderThread = function(){
|
||||
let prevMessages = this.messages;
|
||||
|
||||
this.messages = prevMessages.slice(0, 100);
|
||||
let result = prevFunc.apply(this, arguments);
|
||||
this.messages = prevMessages;
|
||||
|
||||
return result;
|
||||
};
|
||||
}
|
||||
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user