mirror of https://github.com/procxx/kepka.git
Show group / channel in ConfirmInviteBox.
This commit is contained in:
parent
a961615076
commit
8f387891e2
|
@ -658,7 +658,8 @@ ConfirmInviteBox::ConfirmInviteBox(
|
||||||
const QVector<UserData*> &participants)
|
const QVector<UserData*> &participants)
|
||||||
: _title(this, st::confirmInviteTitle)
|
: _title(this, st::confirmInviteTitle)
|
||||||
, _status(this, st::confirmInviteStatus)
|
, _status(this, st::confirmInviteStatus)
|
||||||
, _participants(participants) {
|
, _participants(participants)
|
||||||
|
, _isChannel(isChannel) {
|
||||||
_title->setText(title);
|
_title->setText(title);
|
||||||
QString status;
|
QString status;
|
||||||
if (_participants.isEmpty() || _participants.size() >= count) {
|
if (_participants.isEmpty() || _participants.size() >= count) {
|
||||||
|
@ -694,7 +695,10 @@ ConfirmInviteBox::ConfirmInviteBox(
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfirmInviteBox::prepare() {
|
void ConfirmInviteBox::prepare() {
|
||||||
addButton(langFactory(lng_group_invite_join), [] {
|
const auto joinKey = _isChannel
|
||||||
|
? lng_profile_join_channel
|
||||||
|
: lng_profile_join_group;
|
||||||
|
addButton(langFactory(joinKey), [] {
|
||||||
if (auto main = App::main()) {
|
if (auto main = App::main()) {
|
||||||
main->onInviteImport();
|
main->onInviteImport();
|
||||||
}
|
}
|
||||||
|
|
|
@ -220,6 +220,7 @@ private:
|
||||||
ImagePtr _photo;
|
ImagePtr _photo;
|
||||||
std::unique_ptr<Ui::EmptyUserpic> _photoEmpty;
|
std::unique_ptr<Ui::EmptyUserpic> _photoEmpty;
|
||||||
QVector<UserData*> _participants;
|
QVector<UserData*> _participants;
|
||||||
|
bool _isChannel = false;
|
||||||
|
|
||||||
int _userWidth = 0;
|
int _userWidth = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue