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
4 changes: 2 additions & 2 deletions app/NativeComponents/AuthCallback.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -43,7 +43,7 @@ public function render(): View
*
* @return array<string, string>
*/
private function query(): array
private function callbackQuery(): array
{
parse_str((string) parse_url((string) $this->nativeRouter?->currentUri(), PHP_URL_QUERY), $query);

Expand Down
14 changes: 7 additions & 7 deletions app/NativeComponents/Remotes.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand All @@ -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();
}

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -323,7 +323,7 @@ private function switchTo(string $tab): void
*
* @return array<string, string|null>
*/
private function query(?string $tab = null): array
private function remotesQuery(?string $tab = null): array
{
$tab ??= $this->tab;

Expand All @@ -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);
}
}
Expand Down Expand Up @@ -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);
}
Expand Down
Loading