Rework ActionsHandler
Rework ActionsHandler as static helper functions. The functions are now invoked from ChatBarCache so there is no need to pass an actions handler object around qml simplifying the code.
This commit is contained in:
@@ -60,13 +60,6 @@ Kirigami.Page {
|
||||
*/
|
||||
property MediaMessageFilterModel mediaMessageFilterModel: RoomManager.mediaMessageFilterModel
|
||||
|
||||
/**
|
||||
* @brief The ActionsHandler object to use.
|
||||
*/
|
||||
property ActionsHandler actionsHandler: ActionsHandler {
|
||||
room: root.currentRoom
|
||||
}
|
||||
|
||||
property bool loading: !root.currentRoom || (root.currentRoom.timelineSize === 0 && !root.currentRoom.allHistoryLoaded)
|
||||
|
||||
/// Disable cancel shortcut. Used by the separate window since it provides its own cancel implementation.
|
||||
@@ -123,7 +116,6 @@ Kirigami.Page {
|
||||
page: root
|
||||
timelineModel: root.timelineModel
|
||||
messageFilterModel: root.messageFilterModel
|
||||
actionsHandler: root.actionsHandler
|
||||
onFocusChatBar: {
|
||||
if (chatBarLoader.item) {
|
||||
chatBarLoader.item.forceActiveFocus();
|
||||
@@ -182,7 +174,6 @@ Kirigami.Page {
|
||||
width: parent.width
|
||||
currentRoom: root.currentRoom
|
||||
connection: root.connection
|
||||
actionsHandler: root.actionsHandler
|
||||
onMessageSent: {
|
||||
if (!timelineViewLoader.item.atYEnd) {
|
||||
timelineViewLoader.item.goToLastMessage();
|
||||
|
||||
Reference in New Issue
Block a user