2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-02 15:35:51 +00:00

Improved ripple animation colors and styles for different buttons.

Also moved FlatLabel and LabelSimple to ui/widgets/labels module.
Also moved ScrollArea to ui/widgets/scroll_area module.
This commit is contained in:
John Preston
2016-11-16 13:44:06 +03:00
parent 3186e1e495
commit 7fa274a68e
115 changed files with 1435 additions and 1478 deletions

View File

@@ -1678,18 +1678,20 @@ GameData::GameData(const GameId &id, const uint64 &accessHash, const QString &sh
, document(document) {
}
void PeerOpenClickHandler::onClickImpl() const {
if (App::main()) {
if (peer() && peer()->isChannel() && App::main()->historyPeer() != peer()) {
if (!peer()->asChannel()->isPublic() && !peer()->asChannel()->amIn()) {
Ui::showLayer(new InformBox(lang((peer()->isMegagroup()) ? lng_group_not_accessible : lng_channel_not_accessible)));
ClickHandlerPtr peerOpenClickHandler(PeerData *peer) {
return MakeShared<LambdaClickHandler>([peer] {
if (App::main()) {
if (peer && peer->isChannel() && App::main()->historyPeer() != peer) {
if (!peer->asChannel()->isPublic() && !peer->asChannel()->amIn()) {
Ui::showLayer(new InformBox(lang((peer->isMegagroup()) ? lng_group_not_accessible : lng_channel_not_accessible)));
} else {
Ui::showPeerHistory(peer, ShowAtUnreadMsgId, Ui::ShowWay::Forward);
}
} else {
Ui::showPeerHistory(peer(), ShowAtUnreadMsgId, Ui::ShowWay::Forward);
Ui::showPeerProfile(peer);
}
} else {
Ui::showPeerProfile(peer());
}
}
});
}
MsgId clientMsgId() {