commit 0cf36b8e7a72a4444b9d33f905cd3671278e963a
parent ae1dc1ed5474f3293c6278c9789f07816f8b76d7
Author: Jacki <jacki@thejackimonster.de>
Date: Thu, 26 Sep 2024 18:25:20 +0200
Adjust code to build with timestamp format changes
Diffstat:
3 files changed, 20 insertions(+), 28 deletions(-)
diff --git a/src/chat.c b/src/chat.c
@@ -125,13 +125,13 @@ _chat_idle(void *cls)
}
app->chat.idle = GNUNET_SCHEDULER_add_delayed_with_priority(
- GNUNET_TIME_relative_multiply(
- GNUNET_TIME_relative_get_millisecond_(),
- wgetdelay(app->window)
- ),
- GNUNET_SCHEDULER_PRIORITY_IDLE,
- &_chat_idle,
- app
+ GNUNET_TIME_relative_multiply(
+ GNUNET_TIME_relative_get_millisecond_(),
+ wgetdelay(app->window)
+ ),
+ GNUNET_SCHEDULER_PRIORITY_IDLE,
+ &_chat_idle,
+ app
);
}
diff --git a/src/ui/lobby_create_dialog.c b/src/ui/lobby_create_dialog.c
@@ -68,7 +68,7 @@ lobby_create_dialog_event(UI_LOBBY_CREATE_DIALOG_Handle *create_dialog,
case 27:
case KEY_EXIT:
if (create_dialog->lobby)
- GNUNET_CHAT_lobby_close(create_dialog->lobby);
+ GNUNET_CHAT_lobby_close(create_dialog->lobby);
create_dialog->lobby = NULL;
create_dialog->win = NULL;
@@ -77,21 +77,18 @@ lobby_create_dialog_event(UI_LOBBY_CREATE_DIALOG_Handle *create_dialog,
case KEY_ENTER:
if (create_dialog->uri)
{
- GNUNET_free(create_dialog->uri);
+ GNUNET_free(create_dialog->uri);
- create_dialog->lobby = NULL;
- create_dialog->win = NULL;
+ create_dialog->lobby = NULL;
+ create_dialog->win = NULL;
}
else if (!(create_dialog->lobby))
- create_dialog->lobby = GNUNET_CHAT_lobby_open(
- app->chat.handle,
- GNUNET_TIME_relative_multiply(
- GNUNET_TIME_relative_get_second_(),
- create_dialog->selected
- ),
- _lobby_open_with_uri,
- create_dialog
- );
+ create_dialog->lobby = GNUNET_CHAT_lobby_open(
+ app->chat.handle,
+ create_dialog->selected,
+ _lobby_open_with_uri,
+ create_dialog
+ );
break;
default:
diff --git a/src/ui/messages.c b/src/ui/messages.c
@@ -150,8 +150,7 @@ messages_event(UI_MESSAGES_Handle *messages,
case KEY_BACKSPACE:
if (messages->selected)
GNUNET_CHAT_message_delete(
- messages->selected,
- GNUNET_TIME_relative_get_zero_()
+ messages->selected, 0
);
break;
default:
@@ -407,16 +406,12 @@ messages_add(UI_MESSAGES_Handle *messages,
list_input_select(messages, 1, NULL);
- const struct GNUNET_TIME_Absolute abs_time = (
+ const time_t timestamp = (
GNUNET_CHAT_message_get_timestamp(message)
);
- const struct GNUNET_TIME_Timestamp timestamp = (
- GNUNET_TIME_absolute_to_timestamp(abs_time)
- );
-
element = GNUNET_new(UI_MESSAGES_List);
- element->timestamp = GNUNET_TIME_timestamp_to_s(timestamp);
+ element->timestamp = timestamp;
element->message = message;
GNUNET_CONTAINER_DLL_insert_sorted(