fix: adjust code for refactor of input fields in lib_ui

fix: organize imports
fix: refactor database initialization
fix: update submodule

adjusted following 98bb520f47
This commit is contained in:
ZavaruKitsu 2023-09-23 14:00:47 +03:00
parent 0502acc8a4
commit b6cf5ebb19
30 changed files with 61 additions and 22 deletions

View file

@ -366,7 +366,6 @@ void ActivateBotCommand(ClickHandlerContext context, int row, int column) {
const auto itemId = item->id;
const auto topicRootId = item->topicRootId();
const auto history = item->history();
controller->show(Ui::MakeConfirmBox({
.text = tr::lng_bot_share_phone(),
.confirmed = [=] {

View file

@ -15,8 +15,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_peer_values.h"
#include "apiwrap.h"
// AyuGram includes
#include "ayu/ayu_settings.h"
namespace Api {
namespace {

View file

@ -58,8 +58,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "apiwrap.h"
#include "ui/text/format_values.h" // Ui::FormatPhone
// AyuGram includes
#include "ayu/ayu_settings.h"
namespace Api {
namespace {

View file

@ -9,6 +9,7 @@
#include "ayu_lang.h"
#include "ayu/ayu_lottie.h"
#include "ayu/ui/ayu_lottie.h"
#include "ayu/database/ayu_database.h"
#include "lang/lang_instance.h"
namespace AyuInfra
@ -30,10 +31,15 @@ void initLottie() {
AyuUi::setLottieImpl(std::make_shared<AyuUi::AyuLottieImpl>());
}
void initDatabase() {
AyuDatabase::initialize();
}
void init()
{
initLang();
initLottie();
initDatabase();
}
}

View file

@ -21,6 +21,7 @@
#include "ui/controls/userpic_button.h"
#include "ui/widgets/buttons.h"
#include "ui/widgets/popup_menu.h"
#include "ui/widgets/fields/input_field.h"
#include "ui/widgets/fields/special_fields.h"
#include <QtGui/QGuiApplication>
@ -56,8 +57,10 @@ void EditDeletedMarkBox::prepare()
addButton(tr::lng_cancel(), [=]
{ closeBox(); });
connect(_text, &Ui::InputField::submitted, [=]
{ submit(); });
const auto submitted = [=]
{ submit(); };
_text->submits(
) | rpl::start_with_next(submitted, _text->lifetime());
}
void EditDeletedMarkBox::setInnerFocus()

View file

@ -21,6 +21,7 @@
#include "ui/controls/userpic_button.h"
#include "ui/widgets/buttons.h"
#include "ui/widgets/popup_menu.h"
#include "ui/widgets/fields/input_field.h"
#include "ui/widgets/fields/special_fields.h"
#include <QtGui/QGuiApplication>
@ -55,8 +56,10 @@ void EditEditedMarkBox::prepare()
addButton(tr::lng_cancel(), [=]
{ closeBox(); });
connect(_text, &Ui::InputField::submitted, [=]
{ submit(); });
const auto submitted = [=]
{ submit(); };
_text->submits(
) | rpl::start_with_next(submitted, _text->lifetime());
}
void EditEditedMarkBox::setInnerFocus()

View file

@ -14,7 +14,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/widgets/scroll_area.h"
#include "ui/widgets/shadow.h"
#include "ui/widgets/buttons.h"
#include "ui/widgets/input_fields.h"
#include "ui/ui_utility.h"
#include "mainwidget.h"
#include "mainwindow.h"

View file

@ -61,9 +61,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <QtCore/QMimeData>
// AyuGram includes
#include "ayu/ayu_settings.h"
#include "base/unixtime.h"
namespace {
constexpr auto kMaxMessageLength = 4096;

View file

@ -43,9 +43,12 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "styles/style_menu_icons.h"
#include <QtWidgets/QApplication>
// AyuGram includes
#include <ayu/ayu_settings.h>
#include <ui/boxes/confirm_box.h>
namespace ChatHelpers {
namespace {

View file

@ -55,8 +55,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <QtWidgets/QApplication>
// AyuGram includes
#include "ayu/ayu_settings.h"
namespace ChatHelpers {
namespace {

View file

@ -21,7 +21,7 @@ enum {
AutoSearchTimeout = 900, // 0.9 secs
PreloadHeightsCount = 4, // when 4 screens to scroll left make a preload request
PreloadHeightsCount = 3, // when 3 screens to scroll left make a preload request
SearchPeopleLimit = 20,

View file

@ -20,8 +20,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "calls/group/calls_group_common.h"
#include "spellcheck/spellcheck_types.h"
// AyuGram includes
#include "ayu/ayu_settings.h"
namespace Core {
namespace {
@ -743,7 +745,7 @@ void Settings::addFromSerialized(const QByteArray &serialized) {
case ScreenCorner::TopRight:
case ScreenCorner::BottomRight:
case ScreenCorner::BottomLeft:
case ScreenCorner::TopCenter:_notificationsCorner = uncheckedNotificationsCorner; break;
case ScreenCorner::TopCenter: _notificationsCorner = uncheckedNotificationsCorner; break;
}
_includeMutedCounter = (includeMutedCounter == 1);
_countUnreadMessages = (countUnreadMessages == 1);

View file

@ -35,8 +35,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <QtGui/QScreen>
#include <QtGui/qpa/qplatformscreen.h>
#include "ayu/database/ayu_database.h"
namespace Core {
namespace {
@ -123,8 +121,6 @@ int Sandbox::start() {
}
}
AyuDatabase::initialize();
#if defined Q_OS_LINUX && QT_VERSION >= QT_VERSION_CHECK(6, 2, 0)
_localServer.setSocketOptions(QLocalServer::AbstractNamespaceOption);
_localSocket.setSocketOptions(QLocalSocket::AbstractNamespaceOption);

View file

@ -30,6 +30,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ayu/ayu_state.h"
#include "ayu/sync/ayu_sync_controller.h"
namespace Data {
namespace {

View file

@ -87,6 +87,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ayu/database/ayu_database.h"
#include "ayu/messages/ayu_messages_controller.h"
namespace Data {
namespace {

View file

@ -22,8 +22,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/image/image_location_factory.h"
#include "ui/text/text_utilities.h" // Ui::Text::RichLangValue.
// AyuGram includes
#include "ayu/ayu_settings.h"
namespace Data {
namespace {

View file

@ -233,6 +233,7 @@ void Stories::apply(not_null<PeerData*> peer, const MTPPeerStories *data) {
{
return;
}
if (!data) {
applyDeletedFromSources(peer->id, StorySourcesList::NotHidden);
applyDeletedFromSources(peer->id, StorySourcesList::Hidden);

View file

@ -63,8 +63,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "base/qt/qt_common_adapters.h"
#include "styles/style_dialogs.h"
// AyuGram includes
#include "ayu/ayu_settings.h"
namespace {
constexpr auto kNewBlockEachMessage = 50;

View file

@ -98,9 +98,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <QtWidgets/QApplication>
#include <QtCore/QMimeData>
// AyuGram includes
#include "ayu/ui/context_menu/context_menu.h"
#include "styles/style_ayu_icons.h"
namespace {
constexpr auto kScrollDateHideTimeout = 1000;

View file

@ -69,8 +69,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "payments/payments_checkout_process.h" // CheckoutProcess::Start.
#include "styles/style_dialogs.h"
// AyuGram includes
#include "ayu/ayu_settings.h"
namespace {
constexpr auto kNotificationTextLimit = 255;

View file

@ -163,9 +163,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <QtGui/QWindow>
#include <QtCore/QMimeData>
// AyuGram includes
#include "ayu/ayu_settings.h"
#include "ayu/ayu_state.h"
namespace {
constexpr auto kMessagesPerPageFirst = 30;

View file

@ -42,6 +42,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ayu/ui/boxes/voice_confirmation_box.h"
#include "boxes/abstract_box.h"
namespace HistoryView::Controls {
namespace {

View file

@ -28,8 +28,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "styles/style_chat.h"
#include "styles/style_dialogs.h"
// AyuGram includes
#include "ayu/ayu_settings.h"
namespace HistoryView {
struct BottomInfo::Reaction {

View file

@ -75,7 +75,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <QtGui/QGuiApplication>
#include <QtGui/QClipboard>
// AyuGram includes
#include "ayu/ayu_settings.h"
#include "ayu/database/ayu_database.h"

View file

@ -7,7 +7,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "info/profile/info_profile_actions.h"
#include "ayu/ayu_settings.h"
#include "data/data_peer_values.h"
#include "data/data_session.h"
#include "data/data_folder.h"
@ -16,7 +15,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "data/data_changes.h"
#include "data/data_user.h"
#include "data/notify/data_notify_settings.h"
#include "ui/text/text_entity.h"
#include "ui/wrap/vertical_layout.h"
#include "ui/wrap/padding_wrap.h"
#include "ui/wrap/slide_wrap.h"
@ -69,7 +67,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <QtGui/QGuiApplication>
#include <QtGui/QClipboard>
// AyuGram includes
#include "ayu/ayu_settings.h"
#include "ayu/ui/utils/ayu_profile_values.h"
#include "ui/text/text_entity.h"
namespace Info {
namespace Profile {

View file

@ -69,8 +69,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <QtGui/QClipboard>
#include <QtGui/QWindow>
// AyuGram includes
#include "ayu/ui/settings/settings_ayu.h"
namespace Settings {
namespace {

View file

@ -32,13 +32,14 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <QtCore/QDirIterator>
#ifndef Q_OS_WIN
#include <unistd.h>
#endif // Q_OS_WIN
// AyuGram includes
#include "ayu/ayu_infra.h"
#include "ayu/ayu_settings.h"
#ifndef Q_OS_WIN
#include <unistd.h>
#endif // Q_OS_WIN
//extern "C" {
//#include <openssl/evp.h>

View file

@ -9,7 +9,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "core/application.h"
#include "core/core_settings.h"
#include "lang_auto.h"
#include "platform/platform_specific.h"
#include <QtWidgets/QApplication>
@ -18,6 +17,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ayu/ayu_settings.h"
#include "ayu/ui/settings/settings_ayu.h"
#include "ayu/features/streamer_mode/streamer_mode.h"
#include "lang_auto.h"
namespace Core {

View file

@ -7,7 +7,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "window/window_main_menu.h"
#include "lang_auto.h"
#include "window/themes/window_theme.h"
#include "window/window_peer_menu.h"
#include "window/window_session_controller.h"
@ -75,7 +74,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "styles/style_info.h" // infoTopBarMenu
#include "styles/style_layers.h"
#include "styles/style_menu_icons.h"
#include "tray.h"
#include <QtGui/QWindow>
#include <QtGui/QScreen>
@ -90,6 +88,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ayu/ui/boxes/confirmation_box.h"
#include "ayu/features/streamer_mode/streamer_mode.h"
#include "styles/style_ayu_icons.h"
#include "tray.h"
#include "lang_auto.h"
namespace Window {

@ -1 +1 @@
Subproject commit ca3c91fb0be7db2d61defe5c6b0670e0faa93d03
Subproject commit ab84152a69c7fe03b3d3353d5a887ee23a354445