Commit Graph

15 Commits

Author SHA1 Message Date
miruka
cdf6190cba Fix room sorting for good
Do it the right way with a QSortFilterProxyModel.
2019-05-06 13:07:00 -04:00
miruka
047225fded Rework models hierarchy, room categories models 2019-05-02 14:20:21 -04:00
miruka
012e89f6cb Improved ListModel and ListItem
- New ListItem implemented using a metaclass, which makes defining new
  ListItem subclasses much cleaner and shorter

- ListModel functions taking an index now accept either an int
  (list index) or str (value of a main key)

- getWhere() gone, simply use get(a_main_key_value) now

- updateOrAppendWhere replaced by update()/upsert()
2019-04-29 23:51:37 -04:00
miruka
0df46a0415 Add property notify signals where needed 2019-04-22 11:37:41 -04:00
miruka
4dced63b63 Fix banners not live-updating 2019-04-21 15:34:08 -04:00
miruka
ea8f75c729 Organize banners, add LeftBanner
Previously there was InviteOffer, now there's a base Banner component,
InviteBanner and LeftBanner.
2019-04-21 15:20:20 -04:00
miruka
9602608b87 Add inviter account informations to room invites 2019-04-21 11:15:03 -04:00
miruka
2c5dc7bd4f Handle room invites
Add them to the roomList, and have separate sections:
Invites and Rooms.
2019-04-21 06:56:59 -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
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
11d900965a Add local echoing of messages
As per
https://matrix.org/docs/spec/client_server/latest.html#local-echo
2019-04-18 13:46:39 -04:00
miruka
8a3189df15 Add users currently typing in room bar 2019-04-14 16:12:07 -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
5d4c7b8520 Reorganize backend files, show accounts in UI 2019-04-12 04:33:09 -04:00