Commit Graph

13 Commits

Author SHA1 Message Date
miruka
03dc9be523 Improve hueFromString()
More diversed output, without using hashing function.
2019-04-22 10:04:16 -04:00
miruka
237d750d47 Overhaul room list sorting 2019-04-21 20:55:24 -04:00
miruka
bbf29e29b1 Add InviteOffer component 2019-04-21 10:44:04 -04:00
miruka
21ca38117d Fix Backend.pdb() leftover stuff 2019-04-21 05:15:45 -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
aa55ffbc6a Prevent queuing lots of setTypingState
@futurize() is now called with parentheses and can take a max_instances
int argument. This is used for setTypingState to not have more than one
queued calls per room and True/False state and avoids bombing the server
with old ephemeral events after a network loss and reconnection.
2019-04-19 18:21:19 -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
98b494fcc2 Convert markdown to HTML for sendbox
Also pass to clientManager the Backend, and to Client the clientManager,
and set Qt parents for them.
2019-04-17 23:28:25 -04:00
miruka
6ab4acdc84 Improve room past events loading
- Trigger when room is shown if there's not enough messages to fill the
  list height

- Trigger whenever user is scrolling before a certain point, instead of
  when dragging is released/scrolling stopped and the top edge is hit

- Prevent multiple load requests at same time

- Keep a set of fully loaded rooms, don't request anymore history
  if a room is fully loaded
2019-04-17 22:34:22 -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
a7bf1fca44 Sanitize HTML displayed as message content 2019-04-17 10:49:54 -04:00
miruka
9c66166c4f Display room messages and other events 2019-04-14 12:56:30 -04:00
miruka
5d4c7b8520 Reorganize backend files, show accounts in UI 2019-04-12 04:33:09 -04:00