Reset unread messages when going to bottom after 5s

This commit is contained in:
Julien Wadel 2022-01-26 16:32:39 +01:00
parent cf19039a22
commit 01437a787d
2 changed files with 11 additions and 1 deletions

View file

@ -233,7 +233,7 @@ public:
void sendFileMessage (const QString &path);
Q_INVOKABLE void forwardMessage(ChatMessageModel * model);
void compose ();
void resetMessageCount ();
Q_INVOKABLE void resetMessageCount ();
Q_INVOKABLE void initEntries();
Q_INVOKABLE int loadMoreEntries(); // return new entries count
void callEnded(std::shared_ptr<linphone::Call> call);

View file

@ -52,6 +52,16 @@ Rectangle {
if( loadingEntries && !displaying)
displaying = true
}
onBindToEndChanged: if( bindToEnd){
markAsReadTimer.start()
}
Timer{
id: markAsReadTimer
interval: 5000
repeat: false
running: false
onTriggered: container.proxyModel.chatRoomModel.resetMessageCount()
}
//property var sipAddressObserver: SipAddressesModel.getSipAddressObserver(proxyModel.fullPeerAddress, proxyModel.fullLocalAddress)
// -----------------------------------------------------------------------
Layout.fillHeight: true