mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 05:37:09 +02:00
fix: allow up to 100 recent stickers
fix: insert copyright
This commit is contained in:
parent
243245d680
commit
0a10adfdfd
26 changed files with 193 additions and 33 deletions
|
@ -1,3 +1,10 @@
|
|||
// This is the source code of AyuGram for Desktop.
|
||||
//
|
||||
// We do not and cannot prevent the use of our code,
|
||||
// but be respectful and credit the original author.
|
||||
//
|
||||
// Copyright @Radolyn, 2023
|
||||
|
||||
#include "ayu_lang.h"
|
||||
|
||||
#include "qjsondocument.h"
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
// This is the source code of AyuGram for Desktop.
|
||||
//
|
||||
// We do not and cannot prevent the use of our code,
|
||||
// but be respectful and credit the original author.
|
||||
//
|
||||
// Copyright @Radolyn, 2023
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtNetwork/QNetworkReply>
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
// This is the source code of AyuGram for Desktop.
|
||||
//
|
||||
// We do not and cannot prevent the use of our code,
|
||||
// but be respectful and credit the original author.
|
||||
//
|
||||
// Copyright @Radolyn, 2023
|
||||
|
||||
#include "ayu_settings.h"
|
||||
#include "rpl/lifetime.h"
|
||||
#include "rpl/producer.h"
|
||||
|
@ -164,8 +171,6 @@ namespace AyuSettings {
|
|||
&& sendOfflinePacketAfterOnline);
|
||||
}
|
||||
|
||||
|
||||
|
||||
rpl::producer<QString> get_deletedMarkReactive() {
|
||||
return deletedMarkReactive.value();
|
||||
}
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
// This is the source code of AyuGram for Desktop.
|
||||
//
|
||||
// We do not and cannot prevent the use of our code,
|
||||
// but be respectful and credit the original author.
|
||||
//
|
||||
// Copyright @Radolyn, 2023
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "rpl/producer.h"
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
// This is the source code of AyuGram for Desktop.
|
||||
//
|
||||
// We do not and cannot prevent the use of our code,
|
||||
// but be respectful and credit the original author.
|
||||
//
|
||||
// Copyright @Radolyn, 2023
|
||||
|
||||
#include "ayu_state.h"
|
||||
|
||||
namespace AyuState {
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
// This is the source code of AyuGram for Desktop.
|
||||
//
|
||||
// We do not and cannot prevent the use of our code,
|
||||
// but be respectful and credit the original author.
|
||||
//
|
||||
// Copyright @Radolyn, 2023
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ayu_settings.h"
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
// This is the source code of AyuGram for Desktop.
|
||||
//
|
||||
// We do not and cannot prevent the use of our code,
|
||||
// but be respectful and credit the original author.
|
||||
//
|
||||
// Copyright @Radolyn, 2023
|
||||
|
||||
#include "confirmation_box.h"
|
||||
#include "ayu/ayu_settings.h"
|
||||
#include "window/window_session_controller.h"
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
// This is the source code of AyuGram for Desktop.
|
||||
//
|
||||
// We do not and cannot prevent the use of our code,
|
||||
// but be respectful and credit the original author.
|
||||
//
|
||||
// Copyright @Radolyn, 2023
|
||||
|
||||
#include "ui/layers/box_content.h"
|
||||
#include "window/window_main_menu.h"
|
||||
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
// This is the source code of AyuGram for Desktop.
|
||||
//
|
||||
// We do not and cannot prevent the use of our code,
|
||||
// but be respectful and credit the original author.
|
||||
//
|
||||
// Copyright @Radolyn, 2023
|
||||
|
||||
#include "edit_deleted_mark.h"
|
||||
|
||||
#include "lang/lang_keys.h"
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
// This is the source code of AyuGram for Desktop.
|
||||
//
|
||||
// We do not and cannot prevent the use of our code,
|
||||
// but be respectful and credit the original author.
|
||||
//
|
||||
// Copyright @Radolyn, 2023
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "boxes/abstract_box.h"
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
// This is the source code of AyuGram for Desktop.
|
||||
//
|
||||
// We do not and cannot prevent the use of our code,
|
||||
// but be respectful and credit the original author.
|
||||
//
|
||||
// Copyright @Radolyn, 2023
|
||||
|
||||
#include "edit_edited_mark.h"
|
||||
|
||||
#include "lang/lang_keys.h"
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
// This is the source code of AyuGram for Desktop.
|
||||
//
|
||||
// We do not and cannot prevent the use of our code,
|
||||
// but be respectful and credit the original author.
|
||||
//
|
||||
// Copyright @Radolyn, 2023
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "boxes/abstract_box.h"
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
/*
|
||||
This file is part of Telegram Desktop,
|
||||
the official desktop application for the Telegram messaging service.
|
||||
|
||||
For license and copyright information please follow this link:
|
||||
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
*/
|
||||
// This is the source code of AyuGram for Desktop.
|
||||
//
|
||||
// We do not and cannot prevent the use of our code,
|
||||
// but be respectful and credit the original author.
|
||||
//
|
||||
// Copyright @Radolyn, 2023
|
||||
#include "ui/boxes/confirm_box.h"
|
||||
|
||||
#include "lang/lang_keys.h"
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
/*
|
||||
This file is part of Telegram Desktop,
|
||||
the official desktop application for the Telegram messaging service.
|
||||
|
||||
For license and copyright information please follow this link:
|
||||
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
*/
|
||||
// This is the source code of AyuGram for Desktop.
|
||||
//
|
||||
// We do not and cannot prevent the use of our code,
|
||||
// but be respectful and credit the original author.
|
||||
//
|
||||
// Copyright @Radolyn, 2023
|
||||
#pragma once
|
||||
|
||||
#include "ui/layers/generic_box.h"
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
// This is the source code of AyuGram for Desktop.
|
||||
//
|
||||
// We do not and cannot prevent the use of our code,
|
||||
// but be respectful and credit the original author.
|
||||
//
|
||||
// Copyright @Radolyn, 2023
|
||||
|
||||
#include "context_menu.h"
|
||||
#include "history/history_inner_widget.h"
|
||||
#include "lang_auto.h"
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
// This is the source code of AyuGram for Desktop.
|
||||
//
|
||||
// We do not and cannot prevent the use of our code,
|
||||
// but be respectful and credit the original author.
|
||||
//
|
||||
// Copyright @Radolyn, 2023
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "history/history_inner_widget.h"
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
// This is the source code of AyuGram for Desktop.
|
||||
//
|
||||
// We do not and cannot prevent the use of our code,
|
||||
// but be respectful and credit the original author.
|
||||
//
|
||||
// Copyright @Radolyn, 2023
|
||||
|
||||
#include <styles/style_layers.h>
|
||||
#include <styles/style_boxes.h>
|
||||
#include <ui/effects/scroll_content_shadow.h>
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
// This is the source code of AyuGram for Desktop.
|
||||
//
|
||||
// We do not and cannot prevent the use of our code,
|
||||
// but be respectful and credit the original author.
|
||||
//
|
||||
// Copyright @Radolyn, 2023
|
||||
|
||||
#include <ui/layers/box_content.h>
|
||||
#include "ui/wrap/vertical_layout.h"
|
||||
#include "ui/widgets/scroll_area.h"
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
// This is the source code of AyuGram for Desktop.
|
||||
//
|
||||
// We do not and cannot prevent the use of our code,
|
||||
// but be respectful and credit the original author.
|
||||
//
|
||||
// Copyright @Radolyn, 2023
|
||||
|
||||
#include "ayu_database.h"
|
||||
|
||||
#include "entities.h"
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
// This is the source code of AyuGram for Desktop.
|
||||
//
|
||||
// We do not and cannot prevent the use of our code,
|
||||
// but be respectful and credit the original author.
|
||||
//
|
||||
// Copyright @Radolyn, 2023
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "entities.h"
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
// This is the source code of AyuGram for Desktop.
|
||||
//
|
||||
// We do not and cannot prevent the use of our code,
|
||||
// but be respectful and credit the original author.
|
||||
//
|
||||
// Copyright @Radolyn, 2023
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
#include <ui/boxes/single_choice_box.h>
|
||||
// This is the source code of AyuGram for Desktop.
|
||||
//
|
||||
// We do not and cannot prevent the use of our code,
|
||||
// but be respectful and credit the original author.
|
||||
//
|
||||
// Copyright @Radolyn, 2023
|
||||
|
||||
#include "ayu/boxes/edit_edited_mark.h"
|
||||
#include "ayu/boxes/edit_deleted_mark.h"
|
||||
#include "ayu/ayu_settings.h"
|
||||
|
@ -22,6 +28,7 @@
|
|||
#include "apiwrap.h"
|
||||
#include "api/api_blocked_peers.h"
|
||||
#include "ui/widgets/continuous_sliders.h"
|
||||
#include "ui/boxes/single_choice_box.h"
|
||||
|
||||
namespace Settings {
|
||||
|
||||
|
@ -180,7 +187,8 @@ namespace Settings {
|
|||
}, container->lifetime());
|
||||
}
|
||||
|
||||
void Ayu::SetupCustomization(not_null<Ui::VerticalLayout *> container, not_null<Window::SessionController *> controller) {
|
||||
void Ayu::SetupCustomization(not_null<Ui::VerticalLayout *> container,
|
||||
not_null<Window::SessionController *> controller) {
|
||||
auto settings = &AyuSettings::getInstance();
|
||||
|
||||
AddSubsectionTitle(container, tr::ayu_CustomizationHeader());
|
||||
|
@ -242,9 +250,8 @@ namespace Settings {
|
|||
AddDividerText(container, tr::ayu_SettingsCustomizationHint());
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Ayu::SetupShowPeerId(not_null<Ui::VerticalLayout *> container, not_null<Window::SessionController *> controller) {
|
||||
void Ayu::SetupShowPeerId(not_null<Ui::VerticalLayout *> container,
|
||||
not_null<Window::SessionController *> controller) {
|
||||
auto settings = &AyuSettings::getInstance();
|
||||
|
||||
const auto options = std::vector{
|
||||
|
@ -253,7 +260,7 @@ namespace Settings {
|
|||
QString("Bot API")
|
||||
};
|
||||
|
||||
auto currentVal = AyuSettings::get_showPeerId() | rpl::map([=] (int val) {
|
||||
auto currentVal = AyuSettings::get_showPeerId() | rpl::map([=](int val) {
|
||||
return options[val];
|
||||
});
|
||||
|
||||
|
@ -263,7 +270,7 @@ namespace Settings {
|
|||
currentVal,
|
||||
st::settingsButtonNoIcon);
|
||||
button->addClickHandler([=] {
|
||||
controller->show(Box([=](not_null<Ui::GenericBox*> box) {
|
||||
controller->show(Box([=](not_null<Ui::GenericBox *> box) {
|
||||
const auto save = [=](int index) {
|
||||
settings->set_showPeerId(index);
|
||||
AyuSettings::save();
|
||||
|
@ -306,7 +313,7 @@ namespace Settings {
|
|||
updateLabel(settings->recentStickersCount);
|
||||
|
||||
slider->setPseudoDiscrete(
|
||||
40 + 1, // thx tg
|
||||
100 + 1, // thx tg
|
||||
[=](int amount) { return amount; },
|
||||
settings->recentStickersCount,
|
||||
[=](int amount) { updateLabel(amount); },
|
||||
|
@ -330,9 +337,9 @@ namespace Settings {
|
|||
)->toggleOn(
|
||||
rpl::single(settings->stickerConfirmation)
|
||||
)->toggledValue(
|
||||
) | rpl::filter([=] (bool enabled) {
|
||||
) | rpl::filter([=](bool enabled) {
|
||||
return (enabled != settings->stickerConfirmation);
|
||||
}) | rpl::start_with_next([=] (bool enabled) {
|
||||
}) | rpl::start_with_next([=](bool enabled) {
|
||||
settings->set_stickerConfirmation(enabled);
|
||||
AyuSettings::save();
|
||||
}, container->lifetime());
|
||||
|
@ -344,9 +351,9 @@ namespace Settings {
|
|||
)->toggleOn(
|
||||
rpl::single(settings->GIFConfirmation)
|
||||
)->toggledValue(
|
||||
) | rpl::filter([=] (bool enabled) {
|
||||
) | rpl::filter([=](bool enabled) {
|
||||
return (enabled != settings->GIFConfirmation);
|
||||
}) | rpl::start_with_next([=] (bool enabled) {
|
||||
}) | rpl::start_with_next([=](bool enabled) {
|
||||
settings->set_GIFConfirmation(enabled);
|
||||
AyuSettings::save();
|
||||
}, container->lifetime());
|
||||
|
@ -358,15 +365,16 @@ namespace Settings {
|
|||
)->toggleOn(
|
||||
rpl::single(settings->voiceConfirmation)
|
||||
)->toggledValue(
|
||||
) | rpl::filter([=] (bool enabled) {
|
||||
) | rpl::filter([=](bool enabled) {
|
||||
return (enabled != settings->voiceConfirmation);
|
||||
}) | rpl::start_with_next([=] (bool enabled) {
|
||||
}) | rpl::start_with_next([=](bool enabled) {
|
||||
settings->set_voiceConfirmation(enabled);
|
||||
AyuSettings::save();
|
||||
}, container->lifetime());
|
||||
}
|
||||
|
||||
void Ayu::SetupAyuGramSettings(not_null<Ui::VerticalLayout *> container, not_null<Window::SessionController *> controller) {
|
||||
void Ayu::SetupAyuGramSettings(not_null<Ui::VerticalLayout *> container,
|
||||
not_null<Window::SessionController *> controller) {
|
||||
AddSkip(container);
|
||||
SetupGhostEssentials(container);
|
||||
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
// This is the source code of AyuGram for Desktop.
|
||||
//
|
||||
// We do not and cannot prevent the use of our code,
|
||||
// but be respectful and credit the original author.
|
||||
//
|
||||
// Copyright @Radolyn, 2023
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "settings/settings_common.h"
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
// This is the source code of AyuGram for Desktop.
|
||||
//
|
||||
// We do not and cannot prevent the use of our code,
|
||||
// but be respectful and credit the original author.
|
||||
//
|
||||
// Copyright @Radolyn, 2023
|
||||
|
||||
#include "ui/text/text_utilities.h"
|
||||
#include "ayu/ayu_settings.h"
|
||||
#include "ayu_profile_values.h"
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
// This is the source code of AyuGram for Desktop.
|
||||
//
|
||||
// We do not and cannot prevent the use of our code,
|
||||
// but be respectful and credit the original author.
|
||||
//
|
||||
// Copyright @Radolyn, 2023
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@ the official desktop application for the Telegram messaging service.
|
|||
For license and copyright information please follow this link:
|
||||
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
*/
|
||||
#include <ayu/ayu_settings.h>
|
||||
#include <ayu/boxes/voice_confirmation_box.h>
|
||||
#include "history/view/controls/history_view_voice_record_bar.h"
|
||||
|
||||
#include "api/api_send_progress.h"
|
||||
|
@ -37,6 +35,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "ui/effects/ripple_animation.h"
|
||||
#include "ui/text/format_values.h"
|
||||
#include "ui/painter.h"
|
||||
|
||||
// AyuGram includes
|
||||
#include "ayu/ayu_settings.h"
|
||||
#include "ayu/boxes/voice_confirmation_box.h"
|
||||
#include "boxes/abstract_box.h"
|
||||
|
||||
namespace HistoryView::Controls {
|
||||
|
|
Loading…
Add table
Reference in a new issue