Commit Graph

14 Commits

Author SHA1 Message Date
miruka
1d0cce402e Proper display name retrieval implementation
For any name not found in rooms data, rely on new
nio.HttpClient.get_displayname() function to get and cache it,
e.g. for our own name if no room is joined and past events from users
who left the room.

@futurize now returns PyQtFuture objects, wrapper for the
concurrent.futures.Future objects that can be used from QML,
to ensure name retrieval does not block the GUI.
2019-04-19 02:26:29 -04:00
miruka
f0dab1801a Order the roomEvents models from newest to oldest
Qt somehow handles scrolling on new messages on its own when the
ListView direction is bottom to top.
In normal top to bottom, manual scrolling is completly buggy.
2019-04-17 16:43:18 -04:00
miruka
3ec51b9253 Fix room subtitle reloading
Replace the "reloadThis" ListModel hack by an actual signal,
works when the subtitle is displayed in more than one place
(e.g. two accounts in the same room connected).
2019-04-14 14:33:57 -04:00
miruka
d36cbbc7df Bring back room subtitles
Show last appropriate room message/event as subtitle
2019-04-14 14:09:54 -04:00
miruka
9c66166c4f Display room messages and other events 2019-04-14 12:56:30 -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
d8c6ffefe0 Fix roomList height calculation 2019-04-13 06:28:24 -04:00
miruka
30514fb7db Show joined rooms, delete left rooms
To make the models update correctly in QML:
- ListModel and _QtModel merged
- Return a ListModelMap QObject from properties instead of
  a DefaultDict → QVariantMap
2019-04-12 13:18:46 -04:00
miruka
5d4c7b8520 Reorganize backend files, show accounts in UI 2019-04-12 04:33:09 -04:00
miruka
e4a9fb40ac Add avatar with status icon componant
Will be used later for 1-to-1 user room delegates and room members pane
2019-03-27 19:24:23 -04:00
miruka
c35f7f35af Show last room message as roomDelegate subtitle 2019-03-27 18:43:08 -04:00
miruka
463dca7c55 Fix expand/collapse account button height 2019-03-27 16:43:25 -04:00
miruka
9d838ff57a Disable roomList scrolling within accountLists 2019-03-27 15:53:29 -04:00
miruka
76b699ad64 Organize project files
Put QML components into folders, remove unused ones, split __init__.py
with engine.py.
2019-03-26 05:52:43 -04:00