mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 22:25:12 +00:00
PoC content outside of PopupMenu.
This commit is contained in:
@@ -533,12 +533,20 @@ ReactionsFilter PeerReactionsFilter(not_null<PeerData*> peer) {
|
||||
});
|
||||
}
|
||||
|
||||
int UniqueReactionsLimit(not_null<Main::AppConfig*> config) {
|
||||
return config->get<int>("reactions_uniq_max", 11);
|
||||
}
|
||||
|
||||
int UniqueReactionsLimit(not_null<PeerData*> peer) {
|
||||
return UniqueReactionsLimit(&peer->session().account().appConfig());
|
||||
}
|
||||
|
||||
rpl::producer<int> UniqueReactionsLimitValue(
|
||||
not_null<Main::Session*> session) {
|
||||
const auto config = &session->account().appConfig();
|
||||
return config->value(
|
||||
) | rpl::map([=] {
|
||||
return config->get<int>("reactions_uniq_max", 11);
|
||||
return UniqueReactionsLimit(config);
|
||||
}) | rpl::distinct_until_changed();
|
||||
}
|
||||
|
||||
|
@@ -138,6 +138,7 @@ inline auto PeerFullFlagValue(
|
||||
[[nodiscard]] rpl::producer<ReactionsFilter> PeerReactionsFilterValue(
|
||||
not_null<PeerData*> peer);
|
||||
|
||||
[[nodiscard]] int UniqueReactionsLimit(not_null<PeerData*> peer);
|
||||
[[nodiscard]] rpl::producer<int> UniqueReactionsLimitValue(
|
||||
not_null<Main::Session*> session);
|
||||
|
||||
|
Reference in New Issue
Block a user