Skip to content

Commit

Permalink
Categorize phablets as mobile devices, they are not tablets and the l…
Browse files Browse the repository at this point in the history
…ine between draws closer to mobiles
  • Loading branch information
hisorange committed Jan 6, 2024
1 parent dafa208 commit eb884ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Stages/DeviceDetector.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ public function __invoke(PayloadInterface $payload): PayloadInterface
if (! empty($device['type'])) {
if ($device['type'] === 'desktop') {
$payload->setValue('isDesktop', true);
} elseif ($device['type'] === 'tablet' || $device['type'] === 'phablet') {
} elseif ($device['type'] === 'tablet') {
$payload->setValue('isTablet', true);
} elseif ($device['type'] === 'smartphone' || $device['type'] === 'feature phone') {
} elseif ($device['type'] === 'smartphone' || $device['type'] === 'feature phone' || $device['type'] === 'phablet') {
$payload->setValue('isMobile', true);
}
}
Expand Down

0 comments on commit eb884ea

Please sign in to comment.