mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Show Reject/Accept buttons for offers.
This commit is contained in:
@@ -1219,7 +1219,8 @@ bool HistoryMessageReplyMarkup::hiddenBy(Data::Media *media) const {
|
||||
|
||||
void HistoryMessageReplyMarkup::updateSuggestControls(
|
||||
SuggestionActions actions) {
|
||||
if (actions == SuggestionActions::AcceptAndDecline) {
|
||||
if (actions == SuggestionActions::AcceptAndDecline
|
||||
|| actions == SuggestionActions::GiftOfferActions) {
|
||||
data.flags |= ReplyMarkupFlag::SuggestionAccept;
|
||||
} else {
|
||||
data.flags &= ~ReplyMarkupFlag::SuggestionAccept;
|
||||
@@ -1238,7 +1239,21 @@ void HistoryMessageReplyMarkup::updateSuggestControls(
|
||||
type,
|
||||
&HistoryMessageMarkupButton::type);
|
||||
};
|
||||
if (actions == SuggestionActions::AcceptAndDecline) {
|
||||
if (actions == SuggestionActions::GiftOfferActions) {
|
||||
if (has(Type::SuggestAccept)) {
|
||||
// Nothing changed.
|
||||
}
|
||||
data.rows.push_back({
|
||||
{
|
||||
Type::SuggestDecline,
|
||||
tr::lng_action_gift_offer_decline(tr::now),
|
||||
},
|
||||
{
|
||||
Type::SuggestAccept,
|
||||
tr::lng_action_gift_offer_accept(tr::now),
|
||||
},
|
||||
});
|
||||
} else if (actions == SuggestionActions::AcceptAndDecline) {
|
||||
// ... rows ...
|
||||
// [decline] | [accept]
|
||||
// [suggestchanges]
|
||||
|
||||
Reference in New Issue
Block a user