2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Removed unused refund api support for credits.

This commit is contained in:
23rd
2024-06-04 18:09:25 +03:00
committed by John Preston
parent 9e3e7265d2
commit 5db2821f8c
3 changed files with 0 additions and 53 deletions

View File

@@ -861,10 +861,6 @@ public:
void rowClicked(not_null<PeerListRow*> row) override;
void loadMoreRows() override;
base::unique_qptr<Ui::PopupMenu> rowContextMenu(
QWidget *parent,
not_null<PeerListRow*> row) override;
[[nodiscard]] bool skipRequest() const;
void requestNext();
@@ -957,29 +953,6 @@ void CreditsController::rowClicked(not_null<PeerListRow*> row) {
}
}
base::unique_qptr<Ui::PopupMenu> CreditsController::rowContextMenu(
QWidget *parent,
not_null<PeerListRow*> row) {
const auto entry = static_cast<const CreditsRow*>(row.get())->entry();
if (!entry.bareId) {
return nullptr;
}
auto menu = base::make_unique_q<Ui::PopupMenu>(
parent,
st::defaultPopupMenu);
const auto peer = row->peer();
const auto callback = crl::guard(parent, [=, id = entry.id] {
const auto show = delegate()->peerListUiShow();
Api::CreditsRefund(
peer,
id,
[=] { show->showToast(tr::lng_report_spam_done(tr::now)); },
[=](const QString &error) { show->showToast(error); });
});
menu->addAction(tr::lng_channel_earn_history_return(tr::now), callback);
return menu;
}
rpl::producer<bool> CreditsController::allLoadedValue() const {
return _allLoaded.value();
}