mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-07-25 15:03:03 +02:00
Fixed display of top bar suggestion on premium value changed.
This commit is contained in:
parent
d06a9e2e5c
commit
66e05594f6
1 changed files with 5 additions and 1 deletions
|
@ -18,6 +18,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "core/ui_integration.h"
|
||||
#include "data/data_birthday.h"
|
||||
#include "data/data_changes.h"
|
||||
#include "data/data_peer_values.h" // Data::AmPremiumValue.
|
||||
#include "data/data_session.h"
|
||||
#include "data/data_user.h"
|
||||
#include "dialogs/ui/dialogs_top_bar_suggestion_content.h"
|
||||
|
@ -574,7 +575,10 @@ rpl::producer<Ui::SlideWrap<Ui::RpWidget>*> TopBarSuggestionValue(
|
|||
(was == now) ? toggle.type : anim::type::instant);
|
||||
}, lifetime);
|
||||
|
||||
session->promoSuggestions().value() | rpl::start_with_next([=] {
|
||||
rpl::merge(
|
||||
session->promoSuggestions().value(),
|
||||
Data::AmPremiumValue(session) | rpl::skip(1) | rpl::to_empty
|
||||
) | rpl::start_with_next([=] {
|
||||
const auto was = state->wrap;
|
||||
processCurrentSuggestion(processCurrentSuggestion);
|
||||
if (was != state->wrap) {
|
||||
|
|
Loading…
Add table
Reference in a new issue