Try fixing stuck read notifications
This commit is contained in:
@@ -120,22 +120,9 @@ ToolBar {
|
|||||||
room: currentRoom ?? null
|
room: currentRoom ?? null
|
||||||
}
|
}
|
||||||
|
|
||||||
Timer {
|
|
||||||
id: timeoutTimer
|
|
||||||
repeat: false
|
|
||||||
interval: 2000
|
|
||||||
onTriggered: {
|
|
||||||
repeatTimer.stop()
|
|
||||||
currentRoom.sendTypingNotification(false)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
id: repeatTimer
|
id: repeatTimer
|
||||||
repeat: true
|
|
||||||
interval: 3000
|
interval: 3000
|
||||||
triggeredOnStart: true
|
|
||||||
onTriggered: currentRoom.sendTypingNotification(true)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendMessage(event) {
|
function sendMessage(event) {
|
||||||
@@ -241,8 +228,11 @@ ToolBar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onTextChanged: {
|
onTextChanged: {
|
||||||
timeoutTimer.restart()
|
if (!repeatTimer.running) {
|
||||||
|
currentRoom.sendTypingNotification(true)
|
||||||
|
}
|
||||||
repeatTimer.start()
|
repeatTimer.start()
|
||||||
|
|
||||||
currentRoom.cachedInput = text
|
currentRoom.cachedInput = text
|
||||||
autoAppeared = false;
|
autoAppeared = false;
|
||||||
|
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ QVariantList NeoChatRoom::getUsersTyping() const
|
|||||||
|
|
||||||
void NeoChatRoom::sendTypingNotification(bool isTyping)
|
void NeoChatRoom::sendTypingNotification(bool isTyping)
|
||||||
{
|
{
|
||||||
connection()->callApi<SetTypingJob>(BackgroundRequest, localUser()->id(), id(), isTyping, 5000);
|
connection()->callApi<SetTypingJob>(BackgroundRequest, localUser()->id(), id(), isTyping, 3000);
|
||||||
}
|
}
|
||||||
|
|
||||||
const RoomMessageEvent *NeoChatRoom::lastEvent(bool ignoreStateEvent) const
|
const RoomMessageEvent *NeoChatRoom::lastEvent(bool ignoreStateEvent) const
|
||||||
|
|||||||
Reference in New Issue
Block a user