Update ChatDocumentHandler so RoomManger is no longer required for saving text
Update `ChatDocumentHandler` so `RoomManger` is no longer required for saving the text in the chatbar between room switches. This is achieved by allowing `ChatDocumentHandler` to get the correct `ChatBarChache` itself rather than having to have it passed from `ChatBar.qml`. This avoids any race conditions.
This commit is contained in:
31
src/libneochat/enums/chatbartype.h
Normal file
31
src/libneochat/enums/chatbartype.h
Normal file
@@ -0,0 +1,31 @@
|
||||
// SPDX-FileCopyrightText: 2025 James Graham <james.h.graham@protonmail.com>
|
||||
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <QQmlEngine>
|
||||
|
||||
/**
|
||||
* @class ChatBarType
|
||||
*
|
||||
* This class is designed to define the ChatBarType enumeration.
|
||||
*/
|
||||
class ChatBarType : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
QML_ELEMENT
|
||||
QML_UNCREATABLE("")
|
||||
|
||||
public:
|
||||
/**
|
||||
* @brief The type of chatbar.
|
||||
*/
|
||||
enum Type {
|
||||
Room = 0, /**< A standard room chatbar for creating new messages. */
|
||||
Edit, /**< A chatbar for editing an existing message. */
|
||||
Thread, /**< A chatbar for creating a new threaded message. */
|
||||
None, /**< Undefined. */
|
||||
};
|
||||
Q_ENUM(Type);
|
||||
};
|
||||
Reference in New Issue
Block a user