Added info for empty section of scheduled messages.

This commit is contained in:
23rd 2021-07-20 21:24:51 +03:00 committed by John Preston
parent 95a896004f
commit e1ff230547
2 changed files with 13 additions and 0 deletions

View File

@ -1494,6 +1494,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_saved_forward_here" = "Forward messages here for quick access";
"lng_scheduled_messages" = "Scheduled Messages";
"lng_scheduled_messages_empty" = "No scheduled messages here yet...";
"lng_reminder_messages" = "Reminders";
"lng_scheduled_date" = "Scheduled for {date}";
"lng_scheduled_date_until_online" = "Scheduled until online";

View File

@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "history/view/history_view_scheduled_section.h"
#include "history/view/controls/history_view_compose_controls.h"
#include "history/view/history_view_empty_list_bubble.h"
#include "history/view/history_view_top_bar_widget.h"
#include "history/view/history_view_list_widget.h"
#include "history/view/history_view_schedule_box.h"
@ -24,6 +25,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/chat/attach/attach_send_files_way.h"
#include "ui/special_buttons.h"
#include "ui/ui_utility.h"
#include "ui/text/text_utilities.h"
#include "ui/toasts/common_toasts.h"
#include "api/api_common.h"
#include "api/api_editing.h"
@ -153,6 +155,16 @@ ScheduledWidget::ScheduledWidget(
}
}, _inner->lifetime());
{
auto emptyInfo = base::make_unique_q<EmptyListBubbleWidget>(
_inner,
st::msgServicePadding);
const auto emptyText = Ui::Text::Semibold(
tr::lng_scheduled_messages_empty(tr::now));
emptyInfo->setText(emptyText);
_inner->setEmptyInfoWidget(std::move(emptyInfo));
}
setupScrollDownButton();
setupComposeControls();
}