mirror of https://github.com/procxx/kepka.git
Deleted unused code of Delete Button.
This commit is contained in:
parent
e0d7cae3fe
commit
ecccf673a9
|
@ -175,7 +175,6 @@ private:
|
||||||
object_ptr<Ui::RpWidget> createDescriptionEdit();
|
object_ptr<Ui::RpWidget> createDescriptionEdit();
|
||||||
object_ptr<Ui::RpWidget> createManageGroupButtons();
|
object_ptr<Ui::RpWidget> createManageGroupButtons();
|
||||||
object_ptr<Ui::RpWidget> createStickersEdit();
|
object_ptr<Ui::RpWidget> createStickersEdit();
|
||||||
object_ptr<Ui::RpWidget> createDeleteButton();
|
|
||||||
|
|
||||||
void refreshHistoryVisibility(bool instant);
|
void refreshHistoryVisibility(bool instant);
|
||||||
void showEditPeerTypeBox(std::optional<LangKey> error = std::nullopt);
|
void showEditPeerTypeBox(std::optional<LangKey> error = std::nullopt);
|
||||||
|
@ -271,8 +270,6 @@ object_ptr<Ui::VerticalLayout> Controller::createContent() {
|
||||||
_wrap->add(createPhotoAndTitleEdit());
|
_wrap->add(createPhotoAndTitleEdit());
|
||||||
_wrap->add(createDescriptionEdit());
|
_wrap->add(createDescriptionEdit());
|
||||||
_wrap->add(createManageGroupButtons());
|
_wrap->add(createManageGroupButtons());
|
||||||
// _wrap->add(createStickersEdit());
|
|
||||||
// _wrap->add(createDeleteButton());
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -416,9 +413,6 @@ object_ptr<Ui::RpWidget> Controller::createStickersEdit() {
|
||||||
Expects(_wrap != nullptr);
|
Expects(_wrap != nullptr);
|
||||||
|
|
||||||
const auto channel = _peer->asChannel();
|
const auto channel = _peer->asChannel();
|
||||||
// if (!channel || !channel->canEditStickers()) {
|
|
||||||
// return nullptr;
|
|
||||||
// }
|
|
||||||
|
|
||||||
auto result = object_ptr<Ui::SlideWrap<Ui::VerticalLayout>>(
|
auto result = object_ptr<Ui::SlideWrap<Ui::VerticalLayout>>(
|
||||||
_wrap,
|
_wrap,
|
||||||
|
@ -453,29 +447,6 @@ object_ptr<Ui::RpWidget> Controller::createStickersEdit() {
|
||||||
return std::move(result);
|
return std::move(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
object_ptr<Ui::RpWidget> Controller::createDeleteButton() {
|
|
||||||
Expects(_wrap != nullptr);
|
|
||||||
|
|
||||||
const auto channel = _peer->asChannel();
|
|
||||||
if (!channel || !channel->canDelete()) {
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
const auto text = lang(_isGroup
|
|
||||||
? lng_profile_delete_group
|
|
||||||
: lng_profile_delete_channel);
|
|
||||||
auto result = object_ptr<Ui::PaddingWrap<Ui::LinkButton>>(
|
|
||||||
_wrap,
|
|
||||||
object_ptr<Ui::LinkButton>(
|
|
||||||
_wrap,
|
|
||||||
text,
|
|
||||||
st::editPeerDeleteButton),
|
|
||||||
st::editPeerDeleteButtonMargins);
|
|
||||||
result->entity()->addClickHandler([this] {
|
|
||||||
deleteWithConfirmation();
|
|
||||||
});
|
|
||||||
return std::move(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Controller::refreshHistoryVisibility(bool instant = false) {
|
void Controller::refreshHistoryVisibility(bool instant = false) {
|
||||||
if (!_controls.historyVisibilityWrap) {
|
if (!_controls.historyVisibilityWrap) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue