Page MenuHomePhabricator

[web] move checking for desktop Safari to constant
ClosedPublic

Authored by kamil on Jun 15 2023, 4:33 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 27, 7:50 AM
Unknown Object (File)
Wed, Apr 17, 9:25 PM
Unknown Object (File)
Wed, Apr 17, 9:25 PM
Unknown Object (File)
Wed, Apr 17, 9:25 PM
Unknown Object (File)
Wed, Apr 17, 9:23 PM
Unknown Object (File)
Feb 11 2024, 6:12 AM
Unknown Object (File)
Feb 11 2024, 6:11 AM
Unknown Object (File)
Feb 11 2024, 6:10 AM
Subscribers

Details

Summary

I misunderstood @tomek's suggestion from here: https://phab.comm.dev/D8124?id=27491#inline-52847

Moving not only function result to const but entire logic as this will not change during app lifetime (this is not true for tests but this is handled separately)

Test Plan
  1. Check if this const is truthy for Safari
  2. Check if this const is falsy for other browser (like chrome)

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Jun 15 2023, 4:41 AM
kamil added inline comments.
web/database/utils/db-utils.js
50 ↗(On Diff #27805)

browser && is needed because of tests, in jest function detectBrowser() returns null, and we need this value to initialize isDesktopSafari const even if this does not influence tests at all

This revision is now accepted and ready to land.Jun 15 2023, 8:23 AM