Trigger mark-as-read (almost) immediately after opening chat
This commit is contained in:
parent
063d782001
commit
a432e91996
1 changed files with 10 additions and 0 deletions
|
@ -575,6 +575,7 @@ Page {
|
||||||
}
|
}
|
||||||
|
|
||||||
chatViewCooldownTimer.restart();
|
chatViewCooldownTimer.restart();
|
||||||
|
chatViewStartupReadTimer.restart();
|
||||||
}
|
}
|
||||||
onNewMessageReceived: {
|
onNewMessageReceived: {
|
||||||
if (chatView.manuallyScrolledToBottom || message.sender.user_id === chatPage.myUserId) {
|
if (chatView.manuallyScrolledToBottom || message.sender.user_id === chatPage.myUserId) {
|
||||||
|
@ -604,6 +605,7 @@ Page {
|
||||||
viewMessageTimer.queueViewMessage(chatView.count - 1);
|
viewMessageTimer.queueViewMessage(chatView.count - 1);
|
||||||
}
|
}
|
||||||
chatViewCooldownTimer.restart();
|
chatViewCooldownTimer.restart();
|
||||||
|
chatViewStartupReadTimer.restart();
|
||||||
}
|
}
|
||||||
onNotificationSettingsUpdated: {
|
onNotificationSettingsUpdated: {
|
||||||
chatInformation = chatModel.getChatInformation();
|
chatInformation = chatModel.getChatInformation();
|
||||||
|
@ -933,7 +935,15 @@ Page {
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
Debug.log("[ChatPage] Cooldown completed...");
|
Debug.log("[ChatPage] Cooldown completed...");
|
||||||
chatView.inCooldown = false;
|
chatView.inCooldown = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Timer {
|
||||||
|
id: chatViewStartupReadTimer
|
||||||
|
interval: 200
|
||||||
|
repeat: false
|
||||||
|
running: false
|
||||||
|
onTriggered: {
|
||||||
if (!chatPage.isInitialized) {
|
if (!chatPage.isInitialized) {
|
||||||
Debug.log("Page is initialized!");
|
Debug.log("Page is initialized!");
|
||||||
chatPage.isInitialized = true;
|
chatPage.isInitialized = true;
|
||||||
|
|
Loading…
Reference in a new issue