2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Merge branch 'dev' into player

Conflicts:
	Telegram/SourceFiles/application.cpp
	Telegram/SourceFiles/core/utils.h
	Telegram/SourceFiles/localstorage.cpp
	Telegram/SourceFiles/pspecific_mac_p.mm
This commit is contained in:
John Preston
2016-10-08 12:10:33 +03:00
164 changed files with 6265 additions and 3911 deletions

View File

@@ -3324,10 +3324,7 @@ void MainWidget::start(const MTPUser &user) {
App::feedUsers(MTP_vector<MTPUser>(1, user));
MTP::send(MTPupdates_GetState(), rpcDone(&MainWidget::gotState));
update();
if (!cStartUrl().isEmpty()) {
openLocalUrl(cStartUrl());
cSetStartUrl(QString());
}
_started = true;
App::wnd()->sendServiceHistoryRequest();
Local::readInstalledStickers();
@@ -3335,12 +3332,23 @@ void MainWidget::start(const MTPUser &user) {
Local::readRecentStickers();
Local::readSavedGifs();
_history->start();
checkStartUrl();
}
bool MainWidget::started() {
return _started;
}
void MainWidget::checkStartUrl() {
if (!cStartUrl().isEmpty() && App::self() && !App::passcoded()) {
auto url = cStartUrl();
cSetStartUrl(QString());
openLocalUrl(url);
}
}
void MainWidget::openLocalUrl(const QString &url) {
auto urlTrimmed = url.trimmed();
if (urlTrimmed.size() > 8192) urlTrimmed = urlTrimmed.mid(0, 8192);