Commit Graph

12 Commits

Author SHA1 Message Date
miruka
f65ea9dd0d Just import nio
Instead of nio.events, nio.responses, etc.
All the classes are already available at nio.
2019-04-28 01:17:12 -04:00
miruka
5988eccdbb Add login page and forget room system 2019-04-26 16:02:20 -04:00
miruka
e2d7f18bb8 Fix net.talk() not raising errors for nio bad resp 2019-04-21 07:04:42 -04:00
miruka
8f35e60801 Capitalization, list model and room header work
- Standardized capitalization for variables and file names everywhere in
  QML and JS, get rid of mixed camelCase/snakeCase,
  use camelCase like everywhere in Qt

- ListModel items are now stored and returned as real QObjects with
  PyQt properties and signals.
  This makes dynamic property binding a lot easier and eliminates the need
  for many hacks.

- New update(), updateOrAppendWhere() methods and roles property
  for ListModel

- RoomHeader now properly updates when the room title or topic changes

- Add Backend.pdb(), to make it easier to start the debugger from QML
2019-04-20 17:43:57 -04:00
miruka
188dc6be98 Socket timeouts, always HTTP reconnect on errors 2019-04-19 17:17:37 -04:00
miruka
08368bbf36 Add retry time logic (exponential backoff) 2019-04-19 16:52:12 -04:00
miruka
0d7728665f Handle network errors
- Move HTTP connect/disconnect logic to networkManager
- If a talk fails due to socket error, HTTP transport error or
  nio bad response that might change, retry every 2s until success
- Clean up some leftover debug prints
2019-04-19 16:15:21 -04:00
miruka
a7649d1a7a Make the SendBox work, send plaintext messages 2019-04-17 23:01:26 -04:00
miruka
a0f9acddaa Load past events when scrolling up
Also keep two nio clients internally: one for loop-syncing, one for the
rest; since they can't handle more than one talk at a time.
2019-04-17 21:08:32 -04:00
miruka
13fca98838 Rooms and threads fixes
- Fix roomList height again, now based on model.count().
  All delegates are assumed to be the same height

- Properly update room list when a room is joined or left

- Catch exceptions happening in threads (futures), which previously
  passed silently

- Show "Empty room?" as "<i>Empty Room</i>" + gray [?] avatar
2019-04-13 08:59:10 -04:00
miruka
381c6b5b1c Abort net manager talk for certain error codes 2019-04-12 04:48:00 -04:00
miruka
5d4c7b8520 Reorganize backend files, show accounts in UI 2019-04-12 04:33:09 -04:00