mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 13:17:08 +02:00
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:
parent
0502acc8a4
commit
b6cf5ebb19
30 changed files with 61 additions and 22 deletions
|
@ -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 = [=] {
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
Loading…
Add table
Reference in a new issue