mirror of
https://github.com/moparisthebest/k-9
synced 2025-02-07 10:40:11 -05:00
Only look at the first 8k of a message when calculating message previews
This commit is contained in:
parent
ac0c2489a0
commit
a78776a9ee
@ -2411,6 +2411,16 @@ public class LocalStore extends Store implements Serializable
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
// Only look at the first 8k of a message when calculating
|
||||
// the preview. This should avoid unnecessary
|
||||
// memory usage on large messages
|
||||
if (text.length() > 8192)
|
||||
{
|
||||
text = text.substring(0,8192);
|
||||
}
|
||||
|
||||
|
||||
text = text.replaceAll("(?m)^----.*?$","");
|
||||
text = text.replaceAll("(?m)^[#>].*$","");
|
||||
text = text.replaceAll("(?m)^On .*wrote.?$","");
|
||||
|
Loading…
Reference in New Issue
Block a user