You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now that Quaternion gains multiple accounts support, a need arises to have a ConnectionManager singleton that would create, keep, and delete Connection objects. This same singleton would own a NetworkAccessManager instance; but more importantly, it could notify clients what happens to connections without re-connecting to a new object every time a new Connection is made.
There's a dubious distinction between loginError and loggedOut signals in Connection. In reality loginError is emitted in cases where something terribly bad goes on with user's access - such as AuthenticationRequired response returned from a /sync REST call. I suppose we have to merge these into one signal.
A logged out connection lives for a very short time and its status in general is unclear. In theory the libqmatrixclient code could support relogin in such case (and there's a reconnect() method that does exactly that) - however, Quaternion simply disposes of logged out connections as soon as it detects them. Given that logout (as well as login error, see the previous question) basically mean that the password is not (or no more) effectual, seems that this is the only reasonable way to deal with such connections. If that's the case, emitting Connection::loggedOut may be followed by deleteLater() right in the Connection code.
There's quite a bit of connection orchestration code that now resides in MainWindow but is very well worth putting in the library. There's a rationale for a QMatrixClient::ConnectionManager class. A similar RoomManager class would also be very nice to have and could serve as a library base for the room list model, or even the model itself.
The text was updated successfully, but these errors were encountered:
Now that Quaternion gains multiple accounts support, a need arises to have a
ConnectionManager
singleton that would create, keep, and deleteConnection
objects. This same singleton would own aNetworkAccessManager
instance; but more importantly, it could notify clients what happens to connections without re-connecting to a new object every time a newConnection
is made.In addition, here come a few words from quotient-im/Quaternion#155:
loginError
andloggedOut
signals inConnection
. In realityloginError
is emitted in cases where something terribly bad goes on with user's access - such as AuthenticationRequired response returned from a/sync
REST call. I suppose we have to merge these into one signal.reconnect()
method that does exactly that) - however, Quaternion simply disposes of logged out connections as soon as it detects them. Given that logout (as well as login error, see the previous question) basically mean that the password is not (or no more) effectual, seems that this is the only reasonable way to deal with such connections. If that's the case, emittingConnection::loggedOut
may be followed by deleteLater() right in theConnection
code.MainWindow
but is very well worth putting in the library. There's a rationale for aQMatrixClient::ConnectionManager
class. A similarRoomManager
class would also be very nice to have and could serve as a library base for the room list model, or even the model itself.The text was updated successfully, but these errors were encountered: