aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/service/chat_interaction.vala
diff options
context:
space:
mode:
Diffstat (limited to 'libdino/src/service/chat_interaction.vala')
-rw-r--r--libdino/src/service/chat_interaction.vala10
1 files changed, 5 insertions, 5 deletions
diff --git a/libdino/src/service/chat_interaction.vala b/libdino/src/service/chat_interaction.vala
index f6da1ee6..9943c3c3 100644
--- a/libdino/src/service/chat_interaction.vala
+++ b/libdino/src/service/chat_interaction.vala
@@ -51,8 +51,8 @@ public class ChatInteraction : StreamInteractionModule, Object {
if (!last_input_interaction.has_key(conversation)) {
send_chat_state_notification(conversation, Xep.ChatStateNotifications.STATE_COMPOSING);
}
- last_input_interaction[conversation] = new DateTime.now_utc();
- last_interface_interaction[conversation] = new DateTime.now_utc();
+ last_input_interaction[conversation] = new DateTime.now_local();
+ last_interface_interaction[conversation] = new DateTime.now_local();
}
public void on_message_cleared(Conversation? conversation) {
@@ -62,7 +62,7 @@ public class ChatInteraction : StreamInteractionModule, Object {
}
}
- public void on_conversation_selected(Conversation? conversation) {
+ public void on_conversation_selected(Conversation conversation) {
on_conversation_unfocused(selected_conversation);
selected_conversation = conversation;
on_conversation_focused(conversation);
@@ -106,7 +106,7 @@ public class ChatInteraction : StreamInteractionModule, Object {
if (!iter.valid && iter.has_next()) iter.next();
Conversation conversation = iter.get_key();
if (last_input_interaction.has_key(conversation) &&
- (new DateTime.now_utc()).difference(last_input_interaction[conversation]) >= 15 * TimeSpan.SECOND) {
+ (new DateTime.now_local()).difference(last_input_interaction[conversation]) >= 15 * TimeSpan.SECOND) {
iter.unset();
send_chat_state_notification(conversation, Xep.ChatStateNotifications.STATE_PAUSED);
}
@@ -115,7 +115,7 @@ public class ChatInteraction : StreamInteractionModule, Object {
if (!iter.valid && iter.has_next()) iter.next();
Conversation conversation = iter.get_key();
if (last_interface_interaction.has_key(conversation) &&
- (new DateTime.now_utc()).difference(last_interface_interaction[conversation]) >= 1.5 * TimeSpan.MINUTE) {
+ (new DateTime.now_local()).difference(last_interface_interaction[conversation]) >= 1.5 * TimeSpan.MINUTE) {
iter.unset();
send_chat_state_notification(conversation, Xep.ChatStateNotifications.STATE_GONE);
}