| 63 | } |
| 64 | |
| 65 | void TransferPasswordError( |
| 66 | not_null<Ui::GenericBox*> box, |
| 67 | not_null<Main::Session*> session, |
| 68 | TextWithEntities &&about, |
| 69 | PasswordErrorType error) { |
| 70 | box->setTitle(tr::lng_rights_transfer_check()); |
| 71 | box->setWidth(st::transferCheckWidth); |
| 72 | |
| 73 | auto text = std::move(about).append('\n').append('\n').append( |
| 74 | tr::lng_rights_transfer_check_password( |
| 75 | tr::now, |
| 76 | tr::rich) |
| 77 | ).append('\n').append('\n').append( |
| 78 | tr::lng_rights_transfer_check_session( |
| 79 | tr::now, |
| 80 | tr::rich) |
| 81 | ); |
| 82 | if (error == PasswordErrorType::Later) { |
| 83 | text.append('\n').append('\n').append( |
| 84 | tr::lng_rights_transfer_check_later( |
| 85 | tr::now, |
| 86 | tr::rich)); |
| 87 | } |
| 88 | box->addRow(object_ptr<Ui::FlatLabel>( |
| 89 | box, |
| 90 | rpl::single(text), |
| 91 | st::boxLabel)); |
| 92 | if (error == PasswordErrorType::Later) { |
| 93 | box->addButton(tr::lng_box_ok(), [=] { box->closeBox(); }); |
| 94 | } else { |
| 95 | box->addButton(tr::lng_rights_transfer_set_password(), [=] { |
| 96 | SetCloudPassword(box, session); |
| 97 | }); |
| 98 | box->addButton(tr::lng_cancel(), [=] { box->closeBox(); }); |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | void StartPendingReset( |
| 103 | not_null<Main::Session*> session, |
nothing calls this directly
no test coverage detected