| 309 | } |
| 310 | |
| 311 | TermsLock TermsLock::FromMTP( |
| 312 | Main::Session *session, |
| 313 | const MTPDhelp_termsOfService &data) { |
| 314 | const auto minAge = data.vmin_age_confirm(); |
| 315 | return { |
| 316 | bytes::make_vector(data.vid().c_dataJSON().vdata().v), |
| 317 | TextWithEntities { |
| 318 | qs(data.vtext()), |
| 319 | Api::EntitiesFromMTP(session, data.ventities().v) }, |
| 320 | (minAge ? std::make_optional(minAge->v) : std::nullopt), |
| 321 | data.is_popup() |
| 322 | }; |
| 323 | } |
| 324 | |
| 325 | TermsBox::TermsBox( |
| 326 | QWidget*, |
nothing calls this directly
no test coverage detected