Commit 82411a0
authored
Fix editor exit hang when GutenbergView never finishes loading (#22882)
Track ready state from `setEditorDidBecomeAvailable` and short-circuit
the save-on-exit flow to `UpdateFromEditor.Failed` when the editor
isn't ready. Bound the bridge latch with a 5s timeout that also routes
through `Failed`. Both paths skip mutating the `PostModel`, so the
user's existing draft is preserved when the editor stalls.
Fixes #228781 parent fc05d3b commit 82411a0
3 files changed
Lines changed: 39 additions & 5 deletions
File tree
- WordPress/src/main/java/org/wordpress/android/ui/posts
- editor
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1878 | 1878 | | |
1879 | 1879 | | |
1880 | 1880 | | |
| 1881 | + | |
1881 | 1882 | | |
1882 | 1883 | | |
| 1884 | + | |
| 1885 | + | |
| 1886 | + | |
| 1887 | + | |
| 1888 | + | |
| 1889 | + | |
| 1890 | + | |
| 1891 | + | |
1883 | 1892 | | |
1884 | 1893 | | |
1885 | 1894 | | |
1886 | 1895 | | |
1887 | 1896 | | |
1888 | 1897 | | |
1889 | | - | |
| 1898 | + | |
1890 | 1899 | | |
1891 | 1900 | | |
1892 | 1901 | | |
| |||
Lines changed: 28 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
54 | 58 | | |
55 | 59 | | |
56 | 60 | | |
| |||
257 | 261 | | |
258 | 262 | | |
259 | 263 | | |
| 264 | + | |
| 265 | + | |
260 | 266 | | |
| 267 | + | |
261 | 268 | | |
262 | 269 | | |
263 | 270 | | |
| |||
434 | 441 | | |
435 | 442 | | |
436 | 443 | | |
437 | | - | |
438 | | - | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
439 | 457 | | |
440 | 458 | | |
441 | 459 | | |
| |||
446 | 464 | | |
447 | 465 | | |
448 | 466 | | |
449 | | - | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
450 | 471 | | |
451 | 472 | | |
452 | 473 | | |
| |||
517 | 538 | | |
518 | 539 | | |
519 | 540 | | |
| 541 | + | |
| 542 | + | |
520 | 543 | | |
521 | 544 | | |
522 | 545 | | |
| |||
551 | 574 | | |
552 | 575 | | |
553 | 576 | | |
| 577 | + | |
| 578 | + | |
554 | 579 | | |
555 | 580 | | |
556 | 581 | | |
| |||
0 commit comments