Commit b6653d1
authored
fix: Prevent multiple Android WebView starts (#175)
* chore: Ignore Kotlin build directory
* fix: Disable rudimentary WebView preloading
This load did not consider the editor configuration, meaning it often
loaded the incorrect URL.
Additionally, because the editor reveal logic currently only runs on
first load, this preload intermittently led to an invisible editor;
where the first load revealed the editor and the second, configured load
hid the editor.
1. Preload
2. Hide editor
3. Load URL
4. Reveal editor
5. Start editor with configuration
6. Hide editor
7. Load URL
* feat: Expand Android warmup to load all editor assets
Load and cache not only the manifest, but the editor assets themselves.
* refactor: De-duplicate Android editor load listeners
It appears we added multiple listeners for the same event at some point.
Also, we did not clean up one of the two listeners during tear down.
* refactor: Extracted magic number to named constant
* fix: Replace WebView pool with warmup utilities
the benefits of pooling WebViews became moot once we stopped loading a
URL during the initialization sequence. It now provides no benefit.
Additionally, the pooled WebViews conflicted with the new warmup
utilities. It was possible for an editor launch to reuse an in-progress
warmup WebView. Once the warmup destroyed its WebView, the editor began
failing.1 parent c6aca00 commit b6653d1
File tree
3 files changed
+55
-129
lines changed- android/Gutenberg/src
- main/java/org/wordpress/gutenberg
- test/java/org/wordpress/gutenberg
3 files changed
+55
-129
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| 185 | + | |
185 | 186 | | |
186 | 187 | | |
187 | 188 | | |
| |||
Lines changed: 54 additions & 51 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | 29 | | |
36 | 30 | | |
37 | 31 | | |
| |||
45 | 39 | | |
46 | 40 | | |
47 | 41 | | |
48 | | - | |
49 | 42 | | |
50 | 43 | | |
51 | 44 | | |
| |||
461 | 454 | | |
462 | 455 | | |
463 | 456 | | |
464 | | - | |
465 | 457 | | |
466 | 458 | | |
467 | 459 | | |
| |||
575 | 567 | | |
576 | 568 | | |
577 | 569 | | |
578 | | - | |
| 570 | + | |
579 | 571 | | |
580 | 572 | | |
581 | 573 | | |
| |||
584 | 576 | | |
585 | 577 | | |
586 | 578 | | |
587 | | - | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
588 | 585 | | |
589 | 586 | | |
590 | | - | |
| 587 | + | |
| 588 | + | |
591 | 589 | | |
592 | 590 | | |
593 | 591 | | |
594 | | - | |
595 | | - | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | | - | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
604 | 605 | | |
| 606 | + | |
605 | 607 | | |
606 | 608 | | |
607 | 609 | | |
608 | | - | |
| 610 | + | |
609 | 611 | | |
610 | 612 | | |
611 | 613 | | |
612 | | - | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
613 | 618 | | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
618 | | - | |
619 | 619 | | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
627 | 632 | | |
628 | | - | |
629 | | - | |
630 | | - | |
631 | | - | |
632 | | - | |
633 | | - | |
634 | | - | |
635 | | - | |
636 | | - | |
637 | 633 | | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | | - | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
645 | 648 | | |
646 | 649 | | |
647 | 650 | | |
| |||
Lines changed: 0 additions & 78 deletions
This file was deleted.
0 commit comments