2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Workaround MSVC 15.8 regressions.

This commit is contained in:
John Preston
2018-08-14 22:12:41 +03:00
parent f76a2bc224
commit fddc3d6ad9
5 changed files with 27 additions and 8 deletions

View File

@@ -296,6 +296,7 @@ MainWidget::MainWidget(
checkFloatPlayerVisibility();
});
// MSVC BUG + REGRESSION rpl::mappers::tuple :(
using namespace rpl::mappers;
_controller->activeChatValue(
) | rpl::map([](Dialogs::Key key) {
@@ -303,7 +304,11 @@ MainWidget::MainWidget(
auto canWrite = peer
? Data::CanWriteValue(peer)
: rpl::single(false);
return std::move(canWrite) | rpl::map(tuple(key, _1));
return std::move(
canWrite
) | rpl::map([=](bool can) {
return std::make_tuple(key, can);
});
}) | rpl::flatten_latest(
) | rpl::start_with_next([this](Dialogs::Key key, bool canWrite) {
updateThirdColumnToCurrentChat(key, canWrite);