mirror of
https://github.com/vale981/tdesktop
synced 2025-03-04 17:21:40 -05:00
Alpha 1.1.12: Search in supergroup for count > 50.
Also move search in supergroup members to Actions profile block.
This commit is contained in:
parent
76cafc5059
commit
56cb5ac9c6
6 changed files with 15 additions and 16 deletions
|
@ -102,7 +102,7 @@ void ApiWrap::addLocalChangelogs(int oldAppVersion) {
|
|||
addLocalAlphaChangelog(1001008, "\xE2\x80\x94 Toggle night mode in the main menu.\n");
|
||||
addLocalAlphaChangelog(1001010, "\xE2\x80\x94 Filter added to channel and supergroup event log.\n\xE2\x80\x94 Search by username in privacy exceptions editor fixed.\n\xE2\x80\x94 Adding admins in channels fixed.");
|
||||
addLocalAlphaChangelog(1001011, "\xE2\x80\x94 Send **bold** and __italic__ text in your messages (in addition to already supported `monospace` and ```multiline monospace```).\n\xE2\x80\x94 Search in channel and supergroup admin event log.\n\xE2\x80\x94 Ban members from right click menu in supergroup admin event log.");
|
||||
addLocalAlphaChangelog(1001012, "\xE2\x80\x94 Click on forwarded messages bar to change the recipient chat in case you chose a wrong one first.\n\xE2\x80\x94 Quickly share posts from channels and media messages from bots.\n\xE2\x80\x94 Search in supergroup members by name.\n\xE2\x80\x94 Search in channel members by name if you're a channel admin.\n\xE2\x80\x94 Copy links to messages in public supergroups.");
|
||||
addLocalAlphaChangelog(1001012, "\xE2\x80\x94 Click on forwarded messages bar to change the recipient chat in case you chose a wrong one first.\n\xE2\x80\x94 Quickly share posts from channels and media messages from bots.\n\xE2\x80\x94 Search in large supergroup members by name.\n\xE2\x80\x94 Search in channel members by name if you're a channel admin.\n\xE2\x80\x94 Copy links to messages in public supergroups.");
|
||||
}
|
||||
if (!addedSome) {
|
||||
auto text = lng_new_version_wrap(lt_version, str_const_toString(AppVersionStr), lt_changes, lang(lng_new_version_minor), lt_link, qsl("https://desktop.telegram.org/changelog")).trimmed();
|
||||
|
|
|
@ -30,9 +30,12 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
|||
#include "apiwrap.h"
|
||||
#include "auth_session.h"
|
||||
#include "lang/lang_keys.h"
|
||||
#include "profile/profile_channel_controllers.h"
|
||||
|
||||
namespace Profile {
|
||||
|
||||
constexpr auto kEnableSearchMembersAfterCount = 50;
|
||||
|
||||
using UpdateFlag = Notify::PeerUpdate::Flag;
|
||||
|
||||
ActionsWidget::ActionsWidget(QWidget *parent, PeerData *peer) : BlockWidget(parent, peer, lang(lng_profile_actions_section)) {
|
||||
|
@ -142,6 +145,9 @@ void ActionsWidget::refreshButtons() {
|
|||
addButton(lang(lng_profile_clear_history), SLOT(onClearHistory()));
|
||||
addButton(lang(lng_profile_clear_and_exit), SLOT(onDeleteConversation()));
|
||||
} else if (auto channel = peer()->asChannel()) {
|
||||
if (channel->isMegagroup() && channel->membersCount() > kEnableSearchMembersAfterCount) {
|
||||
addButton(lang(lng_profile_search_members), SLOT(onSearchMembers()));
|
||||
}
|
||||
if (!channel->amCreator() && (!channel->isMegagroup() || channel->isPublic())) {
|
||||
addButton(lang(lng_profile_report), SLOT(onReport()));
|
||||
}
|
||||
|
@ -347,6 +353,12 @@ void ActionsWidget::onLeaveChannel() {
|
|||
})));
|
||||
}
|
||||
|
||||
void ActionsWidget::onSearchMembers() {
|
||||
if (auto channel = peer()->asChannel()) {
|
||||
ParticipantsBoxController::Start(channel, ParticipantsBoxController::Role::Members);
|
||||
}
|
||||
}
|
||||
|
||||
void ActionsWidget::onReport() {
|
||||
Ui::show(Box<ReportBox>(peer()));
|
||||
}
|
||||
|
|
|
@ -57,6 +57,7 @@ private slots:
|
|||
void onDeleteConversation();
|
||||
void onBlockUser();
|
||||
void onUpgradeToSupergroup();
|
||||
void onSearchMembers();
|
||||
void onDeleteChannel();
|
||||
void onLeaveChannel();
|
||||
void onReport();
|
||||
|
|
|
@ -96,7 +96,6 @@ int SettingsWidget::resizeGetHeight(int newWidth) {
|
|||
button->moveToLeft(left, newHeight);
|
||||
newHeight += button->height();
|
||||
};
|
||||
moveLink(_searchMembers);
|
||||
moveLink(_manageAdmins);
|
||||
moveLink(_recentActions);
|
||||
moveLink(_manageBannedUsers);
|
||||
|
@ -110,11 +109,6 @@ int SettingsWidget::resizeGetHeight(int newWidth) {
|
|||
void SettingsWidget::refreshButtons() {
|
||||
refreshEnableNotifications();
|
||||
refreshManageAdminsButton();
|
||||
if (auto megagroup = peer()->asMegagroup()) {
|
||||
_searchMembers.create(this, lang(lng_profile_search_members), st::defaultLeftOutlineButton);
|
||||
_searchMembers->show();
|
||||
connect(_searchMembers, SIGNAL(clicked()), this, SLOT(onSearchMembers()));
|
||||
}
|
||||
refreshManageBannedUsersButton();
|
||||
refreshInviteLinkButton();
|
||||
}
|
||||
|
@ -214,12 +208,6 @@ void SettingsWidget::onNotificationsChange() {
|
|||
App::main()->updateNotifySetting(peer(), _enableNotifications->checked() ? NotifySettingSetNotify : NotifySettingSetMuted);
|
||||
}
|
||||
|
||||
void SettingsWidget::onSearchMembers() {
|
||||
if (auto channel = peer()->asChannel()) {
|
||||
ParticipantsBoxController::Start(channel, ParticipantsBoxController::Role::Members);
|
||||
}
|
||||
}
|
||||
|
||||
void SettingsWidget::onManageAdmins() {
|
||||
if (auto chat = peer()->asChat()) {
|
||||
Ui::show(Box<ContactsBox>(chat, MembersFilter::Admins));
|
||||
|
|
|
@ -45,7 +45,6 @@ protected:
|
|||
|
||||
private slots:
|
||||
void onNotificationsChange();
|
||||
void onSearchMembers();
|
||||
void onManageAdmins();
|
||||
void onRecentActions();
|
||||
void onManageBannedUsers();
|
||||
|
@ -63,7 +62,6 @@ private:
|
|||
void refreshInviteLinkButton();
|
||||
|
||||
object_ptr<Ui::Checkbox> _enableNotifications;
|
||||
object_ptr<Ui::LeftOutlineButton> _searchMembers = { nullptr };
|
||||
object_ptr<Ui::LeftOutlineButton> _manageAdmins = { nullptr };
|
||||
object_ptr<Ui::LeftOutlineButton> _recentActions = { nullptr };
|
||||
object_ptr<Ui::LeftOutlineButton> _manageBannedUsers = { nullptr };
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
- Click on forwarded messages bar to change the recipient chat in case you chose a wrong one first.
|
||||
- Quickly share posts from channels and media messages from bots.
|
||||
- Search in supergroup members by name.
|
||||
- Search in large supergroup members by name.
|
||||
- Search in channel members by name if you're a channel admin.
|
||||
- Copy links to messages in public supergroups.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue