aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/empathy-chat-window.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index c4b84fc1a..e7e5f858e 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -2355,15 +2355,12 @@ empathy_chat_window_present_chat (EmpathyChat *chat,
/* Don't force the window to show itself when it wasn't
* an action by the user
*/
- if (timestamp == TP_USER_ACTION_TIME_NOT_USER_ACTION)
+ if (!tp_user_action_time_should_present (timestamp, &x_timestamp))
return;
priv = GET_PRIV (window);
- if (timestamp == TP_USER_ACTION_TIME_CURRENT_TIME) {
- x_timestamp = GDK_CURRENT_TIME;
- } else {
- x_timestamp = CLAMP (timestamp, 0, G_MAXUINT32);
+ if (x_timestamp != GDK_CURRENT_TIME) {
/* Don't present or switch tab if the action was earlier than the
* last actions X time, accounting for overflow and the first ever
* presentation */