Refactor TimelineView
Refactor TimelineView to make it more reliable and prepare for read marker choice. This is done by creating signalling from the mode when reset which can be used to move the scrollbar to the newest meassage. Some of the spaghetti is also removed so there is no need for ChatBar and TimelineView to talk directly. The code to mark messages as read if they are all visible after 10s has been removed infour of just marking as read on entry if all are visible. This is temporary until a follow up providing user options is finished (although it will be one of the options)
This commit is contained in:
@@ -59,9 +59,9 @@ RoomManager::RoomManager(QObject *parent)
|
||||
m_directChatsConfig = m_config->group(u"DirectChatsActive"_s);
|
||||
|
||||
connect(this, &RoomManager::currentRoomChanged, this, [this]() {
|
||||
m_userListModel->setRoom(m_currentRoom);
|
||||
m_timelineModel->setRoom(m_currentRoom);
|
||||
m_sortFilterRoomTreeModel->setCurrentRoom(m_currentRoom);
|
||||
m_userListModel->setRoom(m_currentRoom);
|
||||
});
|
||||
|
||||
connect(&Controller::instance(), &Controller::activeConnectionChanged, this, [this](NeoChatConnection *connection) {
|
||||
@@ -96,6 +96,7 @@ RoomManager::RoomManager(QObject *parent)
|
||||
m_messageFilterModel->invalidate();
|
||||
}
|
||||
});
|
||||
connect(m_timelineModel->timelineMessageModel(), &MessageModel::modelResetComplete, this, &RoomManager::activateUserModel);
|
||||
MessageFilterModel::setShowAllEvents(NeoChatConfig::self()->showAllEvents());
|
||||
connect(NeoChatConfig::self(), &NeoChatConfig::ShowAllEventsChanged, this, [this] {
|
||||
MessageFilterModel::setShowAllEvents(NeoChatConfig::self()->showAllEvents());
|
||||
|
||||
Reference in New Issue
Block a user