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

Various fixes.

This commit is contained in:
John Preston
2017-11-16 11:45:55 +04:00
parent 5a159d0204
commit 131efa11be
10 changed files with 33 additions and 13 deletions

View File

@@ -518,18 +518,17 @@ void ActionsFiller::addBlockAction(not_null<UserData*> user) {
auto text = Notify::PeerUpdateValue(
user,
Notify::PeerUpdate::Flag::UserIsBlocked)
| rpl::map([user]() -> rpl::producer<QString> {
| rpl::map([user] {
switch (user->blockStatus()) {
case UserData::BlockStatus::Blocked:
return Lang::Viewer(user->botInfo
? lng_profile_unblock_bot
: lng_profile_unblock_user);
case UserData::BlockStatus::NotBlocked:
default:
return Lang::Viewer(user->botInfo
? lng_profile_block_bot
: lng_profile_block_user);
default:
return rpl::single(QString());
}
})
| rpl::flatten_latest()