From e17338e74eb532a1dd15a16421c82944314600a6 Mon Sep 17 00:00:00 2001 From: Simon Hamp Date: Thu, 22 Oct 2026 23:59:48 +0100 Subject: [PATCH] Rename the screens' private query() helpers nativephp/mobile is adding a protected NativeComponent::query() for a screen's query string (NativePHP/mobile-air#401). A private query() in a screen can't override a protected one, so PHP would refuse to load AuthCallback and Remotes. They become callbackQuery() and remotesQuery(). No behaviour change. Co-Authored-By: Claude Opus 5.5 --- app/NativeComponents/AuthCallback.php | 4 ++-- app/NativeComponents/Remotes.php | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/NativeComponents/AuthCallback.php b/app/NativeComponents/AuthCallback.php index 2da3869..ef8dfbe 100644 --- a/app/NativeComponents/AuthCallback.php +++ b/app/NativeComponents/AuthCallback.php @@ -20,7 +20,7 @@ class AuthCallback extends NativeComponent public function mount(Account $account, SignIn $signIn): void { if ($account->user() === null) { - $signIn->receive($this->query()); + $signIn->receive($this->callbackQuery()); } if ($this->nativeRouter?->isRootScreen() ?? true) { @@ -43,7 +43,7 @@ public function render(): View * * @return array */ - private function query(): array + private function callbackQuery(): array { parse_str((string) parse_url((string) $this->nativeRouter?->currentUri(), PHP_URL_QUERY), $query); diff --git a/app/NativeComponents/Remotes.php b/app/NativeComponents/Remotes.php index c257235..b2eb40d 100644 --- a/app/NativeComponents/Remotes.php +++ b/app/NativeComponents/Remotes.php @@ -162,7 +162,7 @@ public function newOrg(): void public function pollInbox(): void { $tab = $this->tab; - $this->refresh(Client::RemotesPath, $this->query(), fn (array $json) => $this->takeFresh($tab, $json), quiet: true); + $this->refresh(Client::RemotesPath, $this->remotesQuery(), fn (array $json) => $this->takeFresh($tab, $json), quiet: true); } /** @@ -171,14 +171,14 @@ public function pollInbox(): void public function load(): void { $tab = $this->tab; - $this->refresh(Client::RemotesPath, $this->query(), fn (array $json) => $this->takeFresh($tab, $json), again: true); + $this->refresh(Client::RemotesPath, $this->remotesQuery(), fn (array $json) => $this->takeFresh($tab, $json), again: true); $this->refreshUnreadNotifications(); } protected function revalidate(): void { $tab = $this->tab; - $this->refresh(Client::RemotesPath, $this->query(), fn (array $json) => $this->takeFresh($tab, $json)); + $this->refresh(Client::RemotesPath, $this->remotesQuery(), fn (array $json) => $this->takeFresh($tab, $json)); $this->refreshUnreadNotifications(); } @@ -248,7 +248,7 @@ public function loadMore(): void return; } - $json = $this->attempt(fn (Client $devnull): array => $devnull->remotes($this->query()['tab'] ?? null, $last->id)); + $json = $this->attempt(fn (Client $devnull): array => $devnull->remotes($this->remotesQuery()['tab'] ?? null, $last->id)); if ($json === null) { return; @@ -323,7 +323,7 @@ private function switchTo(string $tab): void * * @return array */ - private function query(?string $tab = null): array + private function remotesQuery(?string $tab = null): array { $tab ??= $this->tab; @@ -332,7 +332,7 @@ private function query(?string $tab = null): array private function showKept(): void { - if (! $this->off && ($json = $this->cached(Client::RemotesPath, $this->query())) !== null) { + if (! $this->off && ($json = $this->cached(Client::RemotesPath, $this->remotesQuery())) !== null) { $this->takeFresh($this->tab, $json); } } @@ -419,7 +419,7 @@ public function render(): View */ private function preview(string $tab): array { - $json = $this->off || $this->skeletonFrame ? null : $this->cached(Client::RemotesPath, $this->query($tab)); + $json = $this->off || $this->skeletonFrame ? null : $this->cached(Client::RemotesPath, $this->remotesQuery($tab)); return $this->page($tab, array_slice($json === null ? [] : self::conversationsFrom($json), 0, self::PreviewRows), $json !== null, false, null, $this->listKeys[$tab] ?? 0); }