1. 02 Mar, 2018 1 commit
    • Linus Jahn's avatar
      Fix lag when changing chat (#205) · bc071e8c
      Linus Jahn authored
      This also does some clean up and restructuring of the deployment of the
      `chatPartner` property to the ClientThread (MessageHandler) and MessageModel.
      Before, a thread-safe function of the ClientThread was used, so the mutex of it
      blocked the GUI, when the client thread was busy in this moment.
  2. 25 Feb, 2018 1 commit
    • Linus Jahn's avatar
      Add XEP-0352: Client State Indication · 855bc84f
      Linus Jahn authored
      This will give the XMPP server the information if the user is currently actively
      using Kaidan or it's runnning in the background. If it's running in the
      background, the server will only send some important messages, not everything.
  3. 24 Feb, 2018 2 commits
    • Linus Jahn's avatar
      Fix not connecting on the first time · aefd04c7
      Linus Jahn authored
      This fixes that the server wasn't changed after the first connection. The
      problem was that gloox::Client::setServer() only sets the server for connecting
      to, not the JID that is used to for authenticating on the server. There's a
      comment in the documentation that says to change the server manually by getting
      a reference of the jid in the client, but that doesn't work since the returned
      jid is marked as const.
      The solution is to create a new class (GlooxClient) that will have another
      function that is able to set the server in the JID.
    • Linus Jahn's avatar
      Use new ClientThread for XMPP-connection; Make offline usable · 5c513623
      Linus Jahn authored
      This rewrites the full back-end <-> front-end communication, moves the
      connection logic to the back-end and makes the XMPP client connection
      independant of the user interface (they will run parallel). However, the
      database still runs on the main, GUI thread, so this will still block GUI
      rendering (will be done in one of the next commits).
      Now, Kaidan is able to handle different DisconnectionReason, so it can
      distinguish if the authentication failed or there's just no connection to the
      server available. So this will finally make Kaidan offline useable! But it
      currently won't reconenct after losing the connection once.
      The bug that Kaidan always crashed, when logging in after logging out has also
      been fixed with this.
      The LogInPage was simplified: now, the button only shows "Connecting..." (when
      pressed) or "Connect". The trivial state of "retry" has been removed.
      `branding.h` was renamed to `Globals.h`. The new `Enums` namespace is used to
      register enums as a QMetaEnum, to make them printable and accessible in QML. The
      new `Q_ENUM_NS` macro is used for that.
      Coding style: I started to use doxygen-compatible inline documentation for the
      most functions, classes, enums and other elements. I don't want to really use
      doxygen (we're not a library), but it should definitely make it easier for new
      developers to understand the code. So from now on new code should be documented
      like this.
      Closes #107 - Make Kaidan offline usable.