mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-21 23:32:51 +00:00
Prevent crash
This commit is contained in:
parent
77130c5e08
commit
b7dba612ba
2 changed files with 22 additions and 1 deletions
|
@ -542,7 +542,11 @@ final class PagedStorage<T> extends AbstractList<T> {
|
|||
|
||||
// OK only if existing single page, and it's the last one
|
||||
if (!onlyEndPagePresent && !addingLastPage) {
|
||||
throw new IllegalArgumentException("page introduces incorrect tiling");
|
||||
eu.faircode.email.Log.e("Insert page" +
|
||||
" size=" + newPageSize + "/" + mPageSize +
|
||||
" last=" + addingLastPage + " only=" + onlyEndPagePresent);
|
||||
return;
|
||||
//throw new IllegalArgumentException("page introduces incorrect tiling");
|
||||
}
|
||||
if (onlyEndPagePresent) {
|
||||
mPageSize = newPageSize;
|
||||
|
|
17
patches/Paging.patch
Normal file
17
patches/Paging.patch
Normal file
|
@ -0,0 +1,17 @@
|
|||
diff --git a/app/src/main/java/androidx/paging/PagedStorage.java b/app/src/main/java/androidx/paging/PagedStorage.java
|
||||
index c644234c7..500957ae7 100644
|
||||
--- a/app/src/main/java/androidx/paging/PagedStorage.java
|
||||
+++ b/app/src/main/java/androidx/paging/PagedStorage.java
|
||||
@@ -542,7 +542,11 @@ final class PagedStorage<T> extends AbstractList<T> {
|
||||
|
||||
// OK only if existing single page, and it's the last one
|
||||
if (!onlyEndPagePresent && !addingLastPage) {
|
||||
- throw new IllegalArgumentException("page introduces incorrect tiling");
|
||||
+ eu.faircode.email.Log.e("Insert page" +
|
||||
+ " size=" + newPageSize + "/" + mPageSize +
|
||||
+ " last=" + addingLastPage + " only=" + onlyEndPagePresent);
|
||||
+ return;
|
||||
+ //throw new IllegalArgumentException("page introduces incorrect tiling");
|
||||
}
|
||||
if (onlyEndPagePresent) {
|
||||
mPageSize = newPageSize;
|
Loading…
Reference in a new issue