Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions app/NativeComponents/CommitDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,15 @@ class CommitDetail extends NativeComponent
*/
public int $scrollKey = 0;

/**
* Every frame goes in full, as on the Log (see Log::$forceFullFrames). A
* tap on the reply field mounts the thread's scroll view again under a new
* key, and EDGE's subtree reuse sent its unchanged rows as references to
* nodes the phone dropped with the old one, so the thread went blank as
* you started typing.
*/
protected bool $forceFullFrames = true;

public function mount(): void
{
$this->focusReply = $this->data('reply', false) === true;
Expand Down
5 changes: 3 additions & 2 deletions tests/Feature/Screens/LogsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

use App\Devnull\Client;
use App\Devnull\Timeline;
use App\NativeComponents\CommitDetail;
use App\NativeComponents\Log;
use App\NativeComponents\Notifications;
use App\NativeComponents\Profile;
Expand Down Expand Up @@ -311,10 +312,10 @@ function ada(): array
->and(nodeByRef($screen, 'commit-c1')['id'])->toBe($row);
});

it('sends the Log, Notifications and profiles in full every frame, as EDGE advises for lists that change often', function () {
it('sends the Log, Notifications, profiles and commit pages in full every frame, as EDGE advises for lists that change often', function () {
Http::fake(['devnull.test/*' => Http::response(pageJson([]))]);

foreach ([Log::class, Notifications::class, Profile::class] as $screen) {
foreach ([Log::class, Notifications::class, Profile::class, CommitDetail::class] as $screen) {
$instance = Native::test($screen)->instance();

expect((fn (): bool => $this->forceFullFrames)->call($instance))->toBeTrue();
Expand Down
Loading