revoltchat / revite

Revolt client built with Preact.
https://app.revolt.chat
GNU Affero General Public License v3.0
850 stars 201 forks source link

bug: Desktop layout on KaiOS #633

Closed Epicpkmn11 closed 2 years ago

Epicpkmn11 commented 2 years ago

What happened?

Using KaiOS 3.1 on a Nokia 2760 Flip I'm getting the desktop layout instead of the mobile layout, making it impossible to send messages:

![1652678881](https://user-images.githubusercontent.com/41608708/168534360-c6a70d5b-2e10-48a0-aa11-d7fe91e88341.png)

I was able to track the bug down to react-device-detect's isMobile being false, when it should be true, however beyond that I'm stumped... In a test app using the exact same version of react-device-detect it correctly detects this phone as a mobile device, however in Revolt it somehow thinks it's not. It's specifically isMobile that's bugged as I removed everything else from isTouchscreenDevice.ts:3-8 and it was still bugged. By forcing that to true I was able to get it working properly and can confirm that Revolt works (if not super well) on KaiOS 3 if this were working correctly:

![1652683450](https://user-images.githubusercontent.com/41608708/168534363-70d9bd07-8aa6-4270-89e9-94372c3ede1f.png)

If it's at all helpful the user agent of this phone is Mozilla/5.0 (Mobile; N139DL; rv:84.0) Gecko/84.0 Firefox/84 KAIOS/3.1, I selected Firefox and Other as it's based on Firefox 84, but not exactly normal Firefox lol.

Branch

Production (app.revolt.chat)

Commit hash

cca97f9

What browsers are you seeing the problem on?

Firefox, Other (please specify in the "What happened" form)

Relevant log output

No response

Desktop

PWA

Epicpkmn11 commented 2 years ago

This seems to be fixed now, I'm not sure if it was a KaiOS or Revolt update that actually fixed it, but it's working now.

DeclanChidlow commented 2 years ago

I've made a client designed with KaiOS support. The main client (revite) still didn't work great on KaiOS so this should work as a good substitute for you.

https://vale.rocks/unvolt/