2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Replace str_const with base::const_string.

This commit is contained in:
John Preston
2020-01-29 12:44:37 +03:00
parent c03df169b3
commit 74d848311b
18 changed files with 89 additions and 114 deletions

View File

@@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "chat_helpers/gifs_list_widget.h"
#include "base/const_string.h"
#include "data/data_photo.h"
#include "data/data_document.h"
#include "data/data_session.h"
@@ -37,7 +38,7 @@ namespace {
constexpr auto kSaveChosenTabTimeout = 1000;
constexpr auto kSearchRequestDelay = 400;
constexpr auto kInlineItemsMaxPerRow = 5;
constexpr auto kSearchBotUsername = str_const("gif");
constexpr auto kSearchBotUsername = "gif"_cs;
} // namespace
@@ -857,7 +858,7 @@ void GifsListWidget::searchForGifs(const QString &query) {
}
if (!_searchBot && !_searchBotRequestId) {
auto username = str_const_toString(kSearchBotUsername);
auto username = kSearchBotUsername.utf16();
_searchBotRequestId = _api.request(MTPcontacts_ResolveUsername(
MTP_string(username)
)).done([=](const MTPcontacts_ResolvedPeer &result) {