Пример #1
0
Section Memento::DefaultSection(Dialogs::Key key) {
	if (const auto peer = key.peer()) {
		if (peer->isSelf()) {
			return Section(Section::MediaType::Photo);
		}
	}
	return Section(Section::Type::Profile);
}
Пример #2
0
Memento Memento::Default(Dialogs::Key key) {
	if (const auto peer = key.peer()) {
		return Memento(peer->id, DefaultSection(key));
	}
	return Memento(key.feed(), DefaultSection(key));
}