Show group/channel type along with members count
Also show members/subscribers count for channels and supergroups, if possible.
This commit is contained in:
parent
86e02cf13c
commit
4af108ee8d
1 changed files with 12 additions and 3 deletions
|
|
@ -21,6 +21,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "lang/lang_keys.h"
|
#include "lang/lang_keys.h"
|
||||||
#include "storage/file_download.h"
|
#include "storage/file_download.h"
|
||||||
#include "data/data_peer_values.h"
|
#include "data/data_peer_values.h"
|
||||||
|
#include "data/data_channel.h"
|
||||||
#include "data/data_chat.h"
|
#include "data/data_chat.h"
|
||||||
#include "data/data_user.h"
|
#include "data/data_user.h"
|
||||||
#include "data/data_session.h"
|
#include "data/data_session.h"
|
||||||
|
|
@ -452,14 +453,22 @@ void PeerListRow::refreshStatus() {
|
||||||
if (!chat->amIn()) {
|
if (!chat->amIn()) {
|
||||||
setStatusText(tr::lng_chat_status_unaccessible(tr::now));
|
setStatusText(tr::lng_chat_status_unaccessible(tr::now));
|
||||||
} else if (chat->count > 0) {
|
} else if (chat->count > 0) {
|
||||||
setStatusText(tr::lng_chat_status_members(tr::now, lt_count_decimal, chat->count));
|
setStatusText(tr::lng_group_status(tr::now) + ", " + tr::lng_chat_status_members(tr::now, lt_count_decimal, chat->count));
|
||||||
} else {
|
} else {
|
||||||
setStatusText(tr::lng_group_status(tr::now));
|
setStatusText(tr::lng_group_status(tr::now));
|
||||||
}
|
}
|
||||||
} else if (peer()->isMegagroup()) {
|
} else if (peer()->isMegagroup()) {
|
||||||
setStatusText(tr::lng_group_status(tr::now));
|
if (peer()->asChannel()->membersCountKnown()) {
|
||||||
|
setStatusText(tr::ktg_supergroup_status(tr::now) + ", " + tr::lng_chat_status_members(tr::now, lt_count_decimal, peer()->asChannel()->membersCount()));
|
||||||
|
} else {
|
||||||
|
setStatusText(tr::ktg_supergroup_status(tr::now));
|
||||||
|
}
|
||||||
} else if (peer()->isChannel()) {
|
} else if (peer()->isChannel()) {
|
||||||
setStatusText(tr::lng_channel_status(tr::now));
|
if (peer()->asChannel()->membersCountKnown()) {
|
||||||
|
setStatusText(tr::lng_channel_status(tr::now) + ", " + tr::lng_chat_status_subscribers(tr::now, lt_count_decimal, peer()->asChannel()->membersCount()));
|
||||||
|
} else {
|
||||||
|
setStatusText(tr::lng_channel_status(tr::now));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue